vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r21493: LJSV-2107: Some users cannot view their ...

Committer: vad
LJSV-2107: Some users cannot view their entries, get 'page not found' message
U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2012-03-21 13:35:28 UTC (rev 21492)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-03-21 14:04:58 UTC (rev 21493)
@@ -393,7 +393,10 @@
             my $journal_base = $u->journal_base();
             my $username = $u->username;
             if ($username !~ /(^_)|(_$)/){
-                $uri =~ s!^/$username(/|$)!/!;
+                my $username_re = $username;
+                   $username_re =~ s/[-_]/[-_]/g;
+                $uri =~ s!^/$username_re(/|$)!/!; ## /user-name/ and /user_name/;
+
                 return redir("$journal_base$uri$args_wq", LJ::Request::HTTP_MOVED_PERMANENTLY());
             }
         }

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