diff options
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | lib/webrick/httpresponse.rb | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Sun Aug 15 19:59:58 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#set_error): + Fix for possible cross-site scripting (CVE-2010-0541). + Found by Apple, reported by Hideki Yamane. + Patch by Hirokazu Nishio <nishio.hirokazu AT gmail.com>. + Wed Aug 11 10:53:28 2010 NAKAMURA Usaku <usa@ruby-lang.org> * mkconfig.rb: should use RbConfig instead of Config, because the name diff --git a/lib/webrick/httpresponse.rb b/lib/webrick/httpresponse.rb index df78daac13..72257f24c9 100644 --- a/lib/webrick/httpresponse.rb +++ b/lib/webrick/httpresponse.rb @@ -209,7 +209,7 @@ module WEBrick @keep_alive = false self.status = HTTPStatus::RC_INTERNAL_SERVER_ERROR end - @header['content-type'] = "text/html" + @header['content-type'] = "text/html; charset=ISO-8859-1" if respond_to?(:create_error_page) create_error_page() |
