[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
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3336
Canonicalize the username.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
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"; } --------------------------------------------------------------------------------