Pre-Submission Checklist

Type Of Change

Checklist:

Description

This PR aims to fix what seems like a discrepancy in the generated AoR key when using handle_notify from the pua_reginfo module.

I'm not familiar with the codebase but it seems like the AoR key should not include the domain when usrloc's use_domain isn't enabled. This seems to match with usrloc documentation and with the fact that the address is being parsed and the username selected from the parse result. However, the string length is then set with strlen and since parse_uri doesn't allocate strings but simply slices the input string, the result is that the everything after (and including) the username is set as the AoR key.

For example the uri sip:bob@domain currently generates the AoR key bob@domain, when it seems like it should generate a key with only bob.

This PR fixes it by inheriting both the pointer and length of the username part of the parsed uri.

Additional notes

There also seems to be a problem with multi domain support, as it uses the uri variable, but this variable isn't set anywhere except for a null byte. This causes all AoR keys to be empty strings. I've confirmed this in practice.


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/4165

Commit Summary

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/4165@github.com>