wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17134: LJSV-1164. Digest authentication always ...

Committer: gprochaev
LJSV-1164. Digest authentication always fails

U   trunk/cgi-bin/LJ/Request/Apache2.pm
U   trunk/cgi-bin/ljlib.pl
Modified: trunk/cgi-bin/LJ/Request/Apache2.pm
===================================================================
--- trunk/cgi-bin/LJ/Request/Apache2.pm	2010-08-17 04:21:51 UTC (rev 17133)
+++ trunk/cgi-bin/LJ/Request/Apache2.pm	2010-08-17 04:28:19 UTC (rev 17134)
@@ -37,6 +37,7 @@
 sub LJ::Request::SERVER_ERROR              { return Apache2::Const::SERVER_ERROR }
 sub LJ::Request::BAD_REQUEST               { return Apache2::Const::HTTP_BAD_REQUEST }
 sub LJ::Request::HTTP_GONE                 { return Apache2::Const::HTTP_GONE }
+sub LJ::Request::AUTH_REQUIRED             { return Apache2::Const::AUTH_REQUIRED }
 
 my $instance = '';
 

Modified: trunk/cgi-bin/ljlib.pl
===================================================================
--- trunk/cgi-bin/ljlib.pl	2010-08-17 04:21:51 UTC (rev 17133)
+++ trunk/cgi-bin/ljlib.pl	2010-08-17 04:28:19 UTC (rev 17134)
@@ -27,6 +27,7 @@
 use LJ::Entry;     # has a bunch of pkg LJ, non-OO methods at bottom
 use LJ::Constants;
 use LJ::User;
+use LJ::Request;
 use Time::Local ();
 use Storable ();
 use Compress::Zlib ();
@@ -1734,7 +1735,7 @@
         my $authline = "Digest realm=\"lj\", nonce=\"$nonce\", algorithm=MD5, qop=\"auth\"";
         $authline .= ", stale=\"true\"" if $stale;
         LJ::Request->header_out("WWW-Authenticate", $authline);
-        LJ::Request->status_line("401 Authentication required");
+        LJ::Request->status (LJ::Request::AUTH_REQUIRED ());
         return 0;
     };
 

Tags: livejournal, pl, pm, wisest-owl
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments