[asterisk-dev] [Code Review] unbreaking <sip:username> from-uri support for REGISTER
wdoekes
reviewboard at asterisk.org
Mon Nov 14 13:51:40 CST 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1533/
-----------------------------------------------------------
(Updated Nov. 14, 2011, 1:51 p.m.)
Review request for Asterisk Developers and Terry Wilson.
Changes
-------
(Updated summary.)
Summary (updated)
-------
This issue addesses the regression that "sip:username" no longer works as
a REGISTER username.
The changeset does mainly this:
if no username is supplied, we use the domain as the username: <sip:host:port>
effectively becomes <sip:host at host:port>
(My personal preference would be having sip:hostport be rejected for both
register and invites. Especially since sip:username registration had been broken
for quite some time. But there seems to be Digium consensus to keep it. It
was not broken for invites, so here is the re-addition for registers.)
The details of the changeset:
-----------------------------
(A) When registering/inviting, we now disallow an empty domain after the '@'
from-uri BEFORE AFTER
- sip:username at domain OK OK
- sip:username fail OK
- sip:username@ OK fail
- sip:@username fail OK <-- side-effect of parse_uri
(B) When registering, we now check domain ACLs when in place, even when no
domain is supplied:
from-uri BEFORE AFTER
- sip:validuser at validdomain OK OK
- sip:validuser fail fail
- sip:validuser@ OK fail
- sip:validboth fail OK
- sip:validboth@ OK fail
- sip:@validboth fail OK <-- side-effect of parse_uri
(C) When refusing a register with an invalid domain, we send the fake auth
rejection.
(D) The domain is checked for empty in check_user_full() for consistency with
register_verify().
(E) I renamed 'of' to 'name' in check_user_full() for clarity and similarity
with register_verify(). I renamed a couple of 'dummy' variables to
'unused_password' and standardized the variable declarations to the most
common occurrence.
This addresses bug ASTERISK-18389.
https://issues.asterisk.org/jira/browse/ASTERISK-18389
Diffs
-----
/branches/1.8/channels/chan_sip.c 345163
Diff: https://reviewboard.asterisk.org/r/1533/diff
Testing (updated)
-------
Tested the BEFORE and AFTER results when registering and inviting.
Thanks,
wdoekes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111114/b01d40e8/attachment.htm>
More information about the asterisk-dev
mailing list