holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r21942: LJSUP-12170: ?\208?\182?\208?\182.?\209?...

Committer: akanashin
LJSUP-12170: ?\208?\182?\208?\182.?\209?\128?\209?\132 doesn't work
U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2012-05-14 07:47:07 UTC (rev 21941)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-05-14 07:57:04 UTC (rev 21942)
@@ -1206,11 +1206,15 @@
         my $u = LJ::User->new_from_external_domain($host);
 
         unless ($u) {
-            if ($host =~ /(?:xn--80adlbbiisqhy9a|xn--f1aa)\.xn--p1ai/) {
-                LJ::Request->pnotes ('error' => 'baddomainru');
-                LJ::Request->pnotes ('domainname' => $host);
-                LJ::Request->pnotes ('uri_domain_shop' => 'http://www.livejournal.com/shop/domain_ru.bml');
-                return LJ::Request::NOT_FOUND;
+            if ($host =~ /(.*?)\.?(?:xn--80adlbbiisqhy9a|xn--f1aa)\.xn--p1ai/) {
+                if ($1 && !$LJ::DOMAIN_JOURNALS_RU_MAINPAGE{$1}) {
+                    LJ::Request->pnotes ('error' => 'baddomainru');
+                    LJ::Request->pnotes ('domainname' => $host);
+                    LJ::Request->pnotes ('uri_domain_shop' => "$LJ::SITEROOT/shop/domain_ru.bml");
+                    return LJ::Request::NOT_FOUND;
+                } else {
+                    return redir($LJ::SITEROOT);
+                }
             } else {
                 LJ::Request->pnotes ('error' => 'baduser');
                 LJ::Request->pnotes ('remote' => LJ::get_remote());

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