summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-16 03:41:12 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-16 03:41:12 +0000
commit3c7c8c395451ac125c72155099da5942c820ca2b (patch)
tree55498a846f18e5781b6ef069de48e4a47691d9b1
parenta164f6bab9690993ff2a3adc49e6906e8c143577 (diff)
downloadruby-3c7c8c395451ac125c72155099da5942c820ca2b.tar.gz
merge revision(s) 28997:
* 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>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@29002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--lib/webrick/httpresponse.rb2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b6f1962fbe..a87be2f38e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>.
+
Fri Jul 30 08:51:51 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (file_expand_path): home directory must be absolute.
diff --git a/lib/webrick/httpresponse.rb b/lib/webrick/httpresponse.rb
index 98c4a357fa..16bf15b6dd 100644
--- a/lib/webrick/httpresponse.rb
+++ b/lib/webrick/httpresponse.rb
@@ -208,7 +208,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()