You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hypothesis is that the character limit of the bug report is being calculated on the client side via unicode, and on the server side via ascii. This is causing an issue when sending a bug report of maximum length (currently 5,000 characters) if the report has any characters that are encoded more compactly on the frontend vs the backend.
For example, sending 5,000 characters "Moby Dick" (with some unicode characters) is allowed through the frontend but is rejected on the backend. However, sending 5,000 letter "a"s is allowed through both the frontend and the backend.
The text was updated successfully, but these errors were encountered:
altheaden
changed the title
Encoding is causing the length of bug reports with certain characters to be miscalculated.
Encoding is causing the length of bug reports with certain characters to be miscalculated
Apr 1, 2024
Update: this issue is present on some additional forms with text input. However, it is not present on ALL the forms with text input, as I would have expected.
Take this sample input for example: (entirely constructed of unicode characters) ⲣ⫚ₐ▽⬧╃⣆⫝̸⟏⸓⼇➵ⅹ″⭿╸⠷⯌╪Ⓦ⼣⸂⇹‣ⱐ⚷℟⽸⑸⥨⋉⛁⮠≺♀⾈⪨⦩⠃◱≖ⅵ⁙⼀⡎✹⮭❂⢆ⴶ⌠⑊ⱏⱁ➳ⱋ⿏⒍₫Ɱ∶⍎⯻⭡⨋⭕ⰰ⪸Ⳙ⏙⸵ⱚ╋≡ⷈ☺⒦⑥∰✮⪁⡽⇲⥣⪢⸫⻯⍉⤏⎇⋽━☡⫞⽾
If I try to change my username to this via the settings page, it is limited to 30 chars on the frontend, as expected. On the backend, it's rejected, presumably due to this encoding issue.
However, if I try to create an account with this as the username, the request is limited again to 30 chars, but then it goes through on both the frontend and the backend. Bizarre!
@altheaden I'm unable to reproduce this issue. I copied some of your unicode characters, pasted them into the bug report box until hitting the character limit, and then submitted the bug report. Then I received that bug report in an email, indicating that it was not rejected by the backend.
I also was unable to reproduce the behavior you observed with username changes. When I tried changing my username to the string you provided, it was successful.
I was able to carry out both of these actions successfully on both Safari and Firefox.
The hypothesis is that the character limit of the bug report is being calculated on the client side via unicode, and on the server side via ascii. This is causing an issue when sending a bug report of maximum length (currently 5,000 characters) if the report has any characters that are encoded more compactly on the frontend vs the backend.
For example, sending 5,000 characters "Moby Dick" (with some unicode characters) is allowed through the frontend but is rejected on the backend. However, sending 5,000 letter "a"s is allowed through both the frontend and the backend.
The text was updated successfully, but these errors were encountered: