Closed Bug 1237391 Opened 8 years ago Closed 5 years ago

setting a real name, summary, or comment with a U+1F6EA character causes it to be truncated

Categories

(bugzilla.mozilla.org :: General, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Unassigned)

References

Details

If I set a real name field in https://bugzilla.mozilla.org/userprefs.cgi?tab=account with the [airplane] character, it gets truncated after that character.


[2016-01-06 12:12:57 -0800] <dbaron> I is known that changing username at https://bugzilla.mozilla.org/userprefs.cgi?tab=account isn't currently working?
[2016-01-06 12:13:27 -0800] <dbaron> er, wait, it just seems like certain usernames don't get saved
[2016-01-06 12:14:06 -0800] <dbaron> it seems to reject usernames containing [airplane]
[2016-01-06 12:18:23 -0800] <KWierso> dbaron: the [airplane] goes out in the network request when you click "submit changes"
[2016-01-06 12:18:34 -0800] <dbaron> KWierso, "goes out"?
[2016-01-06 12:19:00 -0800] <KWierso> dbaron: I see the [airplane] in the outgoing network request parameters
[2016-01-06 12:19:08 -0800] <KWierso> dbaron: seems that anything after the [airplane] is stripped out
[2016-01-06 12:19:47 -0800] <KWierso> <oldname> + "[airplane]Test" stays as <oldname>
[2016-01-06 12:20:09 -0800] <KWierso> <oldname> + "Test[airplane]" becomes <oldname> + "Test"

where [airplane] is U+01f6ea (NORTHEAST-POINTING AIRPLANE)
Summary: setting a real name field with a → setting a real name field with a
Summary: setting a real name field with a → setting a real name, summary, or comment with a U+1F6EA character causes it to be truncated
This is because mysql's utf8 only supports three bytes and thus nothing outside of the BMP.

http://stackoverflow.com/questions/1168036/how-to-fix-incorrect-string-value-errors

I wonder if we have another bug on file about this.
I believe this was fixed upstream in bug 405011 and released as part of Bugzilla 5.0.  dkl is merging everything from upstream master right now, so we will get this fix at some point this quarter (bit of a job to ensure everything is still working, since BMO has diverged from upstream in nontrivial ways).
bug 405011 will fix comments, but not usernames, bug summary or any other text field.
the real fix for this is bug 868867.  upstream isn't in a position to do that, but we could do it on bmo.  (i'd prefer that over the kludge in bug 405011 any day).
Status: NEW → RESOLVED
Closed: 5 years ago
Depends on: bmo-emoji
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.