Skip to content
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

Save the original user and password part when parsing URI #4043

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

sauwming
Copy link
Member

@sauwming sauwming commented Aug 19, 2024

We have received the following report:

In some cases, data that could be represented by an unreserved
   character may appear escaped; for example, some of the unreserved
   "mark" characters are automatically escaped by some systems.

For example: sip:%[email protected] (which is decoded as sip:*[email protected]).

  • PJSIP will parse the URI, unescape it, and then store and use it in its unescaped form.
  • But the remote will reject this URI when unescaped.

Although both URIs should be identical according to the RFC, it may be preferable if we use the URI in its original encoding.

@sauwming sauwming marked this pull request as ready for review August 20, 2024 02:17
@sauwming sauwming self-assigned this Aug 20, 2024
@sauwming sauwming added this to the release-2.15 milestone Aug 20, 2024
@sauwming sauwming merged commit ae608cc into master Aug 21, 2024
36 checks passed
@sauwming sauwming deleted the sip-uri-original branch August 21, 2024 00:13
@umerov1999
Copy link

This patch makes it impossible to determine the extension number of an incoming call. Instead of a number I get asterisk@ip

@sauwming
Copy link
Member Author

Can you elaborate? The patch will only make the number appear encoded, if it's originally encoded by the remote, it shouldn't make it disappear.

@umerov1999
Copy link

if (url->orig_userpass.slen)
copy_advance_check(buf, url->orig_userpass);

I think the problem is in this piece of code. My usernames are set in Cyrillic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants