Conversation
…errors Co-authored-by: oharsta <530657+oharsta@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix illegal unquoted character issue in role name
Sanitize control characters from role name and description before submission
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Entering a newline (or any other ASCII control character) in a role's name or description caused the server to throw
HttpMessageNotReadableException: JSON parse error: Illegal unquoted character ((CTRL-CHAR, code 10)), since control characters are invalid in unescaped JSON strings.Changes
client/src/pages/RoleForm.jsx— Insubmit(), strip all ASCII control characters (\u0000–\u001F,\u007F) fromnameanddescriptionand trim the result before the payload is sent to the API:Sanitization is applied at submission time only, so the user's in-progress input is not affected while typing.
Original prompt
This section details on the original issue you should resolve
<issue_title>Illegal unquoted character in Rol naam?</issue_title>
<issue_description>Er lijkt een fout op te treden bij het gebruik van een newline in de rol naam:
Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string valueVerderop wordt verwezen naar
invite.model.RoleRequest["name"]Kunnen we dit afvangen in de UI?