fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-01-04 03:45 am

[dw-free] http://bugs.dwscoalition.org/show_bug.cgi?id=3336

[commit: http://hg.dwscoalition.org/dw-free/rev/22de99a4d38e]

http://bugs.dwscoalition.org/show_bug.cgi?id=3336

Canonicalize the username.

Patch by [personal profile] fu.

Files modified:
  • htdocs/feeds/index.bml
--------------------------------------------------------------------------------
diff -r 5ed22aacfa73 -r 22de99a4d38e htdocs/feeds/index.bml
--- a/htdocs/feeds/index.bml	Tue Jan 04 10:24:48 2011 +0800
+++ b/htdocs/feeds/index.bml	Tue Jan 04 10:36:32 2011 +0800
@@ -32,10 +32,14 @@ body<=
         $url =~ s/^feed://;           # eg, feed:http://www.example.com/
 
         if ($acct ne "") {
+            $acct = LJ::canonical_username( $acct );
+
             return $error->($ML{'.invalid.accountname'})
-                if $acct && $acct !~ /^\w{3,20}$/; # This needs to be 5 less then the username limt.
+                if ! $acct || $acct !~ /^\w{3,20}$/; # This needs to be 5 less then the username limt.
+
             return $error->( $ML{'.invalid.reserved'} )
                 if LJ::User->is_protected_username( $acct );
+
             # Postpend _feed here, username should be valid by this point.
             $acct .= "_feed";
         }
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org