Page MenuHomePhabricator

Very long usernames can't have personal javascript/css files
Closed, ResolvedPublic


Author: conrad.irwin

If a username is > 242 bytes (highly unlikely, I know) then appending "/monobook.css" will put the page over the 255 byte limit.

The easiest solution would seem to be to limit user-names to a meagre 235 bytes (58 4-byte characters instead of the current 63 still seems perfectly long enough for something one has to type - and indeed enwiki uses Titleblacklist to reduce this to 40), and skin names to 15 (currently cologneblue is 11).

Version: unspecified
Severity: trivial



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:10 PM
bzimport set Reference to bz23080.
bzimport added a subscriber: Unknown Object (MLST).

I think the problem is the too-long usernames, not this issue. I checked, it's actually a 255 character limit, not 255 bytes. Limit it to 2^6 chars?

conrad.irwin wrote:

What did you look at to work that out?

I tried to create the page æ * 130 on Wikipedia, and that was a no-go (though æ * 120 is fine). [See also the comment on line 2535 of Title.php]. A byte limit makes most sense as that's what mysql enforces within a VARBINARY(255).

Uh, sorry, you're right. It's 255 byte, not characters. The fix looks fine, as long as we don't have real long skin names ("monobook" (8 chars) to "vector" (6 chars) has been an improvement ;))