[Catalyst-commits] r8105 - in
trunk/Catalyst-Plugin-Authentication-Credential-HTTP: .
lib/Catalyst/Plugin/Authentication/Credential t
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sat Jul 12 12:44:15 BST 2008
Author: t0m
Date: 2008-07-12 12:44:15 +0100 (Sat, 12 Jul 2008)
New Revision: 8105
Modified:
trunk/Catalyst-Plugin-Authentication-Credential-HTTP/Changes
trunk/Catalyst-Plugin-Authentication-Credential-HTTP/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm
trunk/Catalyst-Plugin-Authentication-Credential-HTTP/t/basic.t
Log:
Fix RT#31036
Modified: trunk/Catalyst-Plugin-Authentication-Credential-HTTP/Changes
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Credential-HTTP/Changes 2008-07-11 12:25:45 UTC (rev 8104)
+++ trunk/Catalyst-Plugin-Authentication-Credential-HTTP/Changes 2008-07-12 11:44:15 UTC (rev 8105)
@@ -1,5 +1,6 @@
-0.11 2008-XX-XX
+0.11 2008-11-12
- Changed cache modules used in the tests to not be deprecated.
+ - Fix RT#31036, and comply with RFC2617 Section 1.2.
0.10 2007-04-26
- switch to Module::Install
Modified: trunk/Catalyst-Plugin-Authentication-Credential-HTTP/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Credential-HTTP/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm 2008-07-11 12:25:45 UTC (rev 8104)
+++ trunk/Catalyst-Plugin-Authentication-Credential-HTTP/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm 2008-07-12 11:44:15 UTC (rev 8105)
@@ -11,7 +11,7 @@
use Catalyst ();
use Digest::MD5 ();
-our $VERSION = "0.10";
+our $VERSION = "0.11";
sub authenticate_http {
my ( $c, @args ) = @_;
@@ -247,7 +247,9 @@
my ( $c, $opts ) = @_;
if ( my $realm = $opts->{realm} ) {
- return 'realm=' . String::Escape::qprintable($realm);
+ my $realm_name = String::Escape::qprintable($realm);
+ $realm_name =~ s/"/\\"/g;
+ return 'realm="' . $realm_name . '"';
} else {
return;
}
Modified: trunk/Catalyst-Plugin-Authentication-Credential-HTTP/t/basic.t
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Credential-HTTP/t/basic.t 2008-07-11 12:25:45 UTC (rev 8104)
+++ trunk/Catalyst-Plugin-Authentication-Credential-HTTP/t/basic.t 2008-07-12 11:44:15 UTC (rev 8105)
@@ -52,4 +52,5 @@
is( $body, 'Authorization required.' );
like( ($res_headers->header('WWW-Authenticate'))[0], qr/^Digest/, "WWW-Authenticate header set: digest");
like( ($res_headers->header('WWW-Authenticate'))[1], qr/^Basic/, "WWW-Authenticate header set: basic");
-like( ($res_headers->header('WWW-Authenticate'))[1], qr/realm=foo/, "WWW-Authenticate header set: basic with realm");
+like( ($res_headers->header('WWW-Authenticate'))[1], qr/realm="foo"/, "WWW-Authenticate header set: basic with realm");
+
More information about the Catalyst-commits
mailing list