]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 368502 - "Bugzilla_logincookie should not be accessible via javascript" [p=reed...
authorreed%reedloden.com <>
Sat, 23 Aug 2008 04:39:39 +0000 (04:39 +0000)
committerreed%reedloden.com <>
Sat, 23 Aug 2008 04:39:39 +0000 (04:39 +0000)
Bugzilla/Auth/Persist/Cookie.pm
Bugzilla/Install/Requirements.pm
template/en/default/pages/release-notes.html.tmpl

index 3faa892aeb7d93f8b1d1b428b9cf1eeb0935611b..4928068e51e507c8bb515a9b23cb5efbd458962f 100644 (file)
@@ -76,17 +76,20 @@ sub persist_login {
     {
         $cgi->send_cookie(-name => 'Bugzilla_login',
                           -value => $user->id,
+                          -httponly => 1,
                           -expires => 'Fri, 01-Jan-2038 00:00:00 GMT');
         $cgi->send_cookie(-name => 'Bugzilla_logincookie',
                           -value => $login_cookie,
+                          -httponly => 1,
                           -expires => 'Fri, 01-Jan-2038 00:00:00 GMT');
-
     }
     else {
         $cgi->send_cookie(-name => 'Bugzilla_login',
-                          -value => $user->id);
+                          -value => $user->id,
+                          -httponly => 1);
         $cgi->send_cookie(-name => 'Bugzilla_logincookie',
-                          -value => $login_cookie);
+                          -value => $login_cookie,
+                          -httponly => 1);
     }
 }
 
index fd3dcf589092e078f72cd1f377ef69ce95e5e9e0..2216d963dd37f47aef7efa01c13f40d3c1c5aafa 100644 (file)
@@ -61,7 +61,8 @@ sub REQUIRED_MODULES {
         module  => 'CGI',
         # Perl 5.10 requires CGI 3.33 due to a taint issue when
         # uploading attachments, see bug 416382.
-        version => (vers_cmp($perl_ver, '5.10') > -1) ? '3.33' : '2.93'
+        # Require CGI 3.21 for -httponly support, see bug 368502.
+        version => (vers_cmp($perl_ver, '5.10') > -1) ? '3.33' : '3.21'
     },
     {
         package => 'TimeDate',
index 487e648b961e10fdf2e6b71f42ed85433d32fe11..fad39ea472b433c63f9f0ed39eef4220dd33d636 100644 (file)
@@ -79,7 +79,7 @@
 [% INCLUDE req_table reqs = REQUIRED_MODULES 
                      new = []
                      updated = ['Template-Toolkit', 'Email-MIME',
-                                'Email-MIME-Modifier'] %]
+                                'Email-MIME-Modifier', 'CGI'] %]
 
 <h3><a name="v32_req_optional_mod"></a>Optional Perl Modules</h3>