vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r19307: LJSUP-9109: update ljuniq cookie parser....

Committer: vad
LJSUP-9109: update ljuniq cookie parser.
U   trunk/cgi-bin/LJ/UniqCookie.pm
Modified: trunk/cgi-bin/LJ/UniqCookie.pm
===================================================================
--- trunk/cgi-bin/LJ/UniqCookie.pm	2011-06-16 08:25:59 UTC (rev 19306)
+++ trunk/cgi-bin/LJ/UniqCookie.pm	2011-06-16 10:21:38 UTC (rev 19307)
@@ -471,8 +471,10 @@
 
     my $cookieval = LJ::Request->header_in("Cookie");
 
-    if ($cookieval =~ /\bljuniq\s*=\s*([a-zA-Z0-9]{15}):(\d+)([^;]+)/) {
-        return wantarray() ? ($1, $2, $3) : $1;
+    if ($cookieval =~ /\bljuniq\s*=\s*([a-zA-Z0-9]{15})(?:\:|\%3A)(\d+)([^;]+)/) {
+        my ($uniq, $uniq_time, $uniq_extra) = ($1, $2, $3);
+        $uniq_extra =~ s/\%3A/:/g;
+        return wantarray() ? ($uniq, $uniq_time, $uniq_extra) : $uniq;
     }
 
     return;

Tags: livejournal, pm, vadvs
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 

  • 0 comments