madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r21632: LJSV-2133: Domain mapping broken for aut...

Committer: sbelyaev
LJSV-2133: Domain mapping broken for authorized users (work as redirect to login.bml)
U   trunk/cgi-bin/LJ/Session.pm
Modified: trunk/cgi-bin/LJ/Session.pm
===================================================================
--- trunk/cgi-bin/LJ/Session.pm	2012-04-04 10:59:06 UTC (rev 21631)
+++ trunk/cgi-bin/LJ/Session.pm	2012-04-04 11:13:22 UTC (rev 21632)
@@ -327,6 +327,22 @@
                http_only       => 1,
                @expires,);
 
+
+    my $curl = _current_url();
+    
+    if ( $sess->domain_journal($curl) eq '__external' ) {
+        $curl =~ m|^https?://(.+?)/|i;
+        my $domain = $1;
+        
+        set_cookie('ljdomsess.__external'
+                                   => $sess->loggedin_cookie_string,
+                   domain          => $domain,
+                   path            => '/',
+                   http_only       => 1,
+                   @expires,);
+    }
+
+
     $sess->owner->preload_props('schemepref', 'browselang');
 
     if (my $scheme = $sess->owner->prop('schemepref')) {

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