-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uric/contact: fix display name and contact header uri escaping #762
Merged
Conversation
This file contains 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
In display names, LWS may not be escaped according to RFC 3261 section 25.1.
maximilianfridrich
changed the title
uric: fix display name uri escaping
uric/contact: fix display name and contact header uri escaping
Apr 13, 2023
maximilianfridrich
force-pushed
the
disp_name_fix
branch
from
April 13, 2023 14:36
9506e95
to
06eea86
Compare
Looks good to me. Escaping URI parameters will be handled in a separate PR. |
The display name is sent as a quoted-string which must not be escaped. Further, basically all UTF-8 characters are allowed in display names, so not checking it should be fine for almost all cases.
Then we should remove |
We shortly added this function. So most likely nobody depends on it. |
sreimers
reviewed
Apr 28, 2023
maximilianfridrich
force-pushed
the
disp_name_fix
branch
from
May 2, 2023 05:10
b2a7736
to
5c104b4
Compare
maximilianfridrich
force-pushed
the
disp_name_fix
branch
from
May 2, 2023 05:22
f24af08
to
5a5a723
Compare
I think this one looks ready for merge ... |
KORuL
pushed a commit
to KORuL/re
that referenced
this pull request
May 11, 2023
…ip#762) * uric: fix display name uri escaping In display names, LWS may not be escaped according to RFC 3261 section 25.1. * contact: escape Contact header SIP URI * uri,contact: improve uri escaping of user part * dialog: do not escape display name in FROM header The display name is sent as a quoted-string which must not be escaped. Further, basically all UTF-8 characters are allowed in display names, so not checking it should be fine for almost all cases. * uric: remove unused functions
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.
In re, display names are always sent as quoted-string which must not be escaped. Further, basically all UTF-8 characters are allowed in quoted-strings, so not checking it should be fine for almost all cases. The relevant rules in the BNF of RFC 3261 section 25.1:
So the special character 0x00-0x20 (execpt LWS), 0x7F, '', '"', CR and LF are not allowed. And the
quoted-pair
rules even allows'"'
and'\'
(and any other ASCII character except for CR and LF) as long as they are preceded by a'\'
.Also, SIP URIs in the Contact header must be escaped.