[asterisk-dev] [Code Review] manager: allowmultiplelogin = no causes multiple login errors to occur for commands that don't require an authenticated session and a username to be specified.

jrose reviewboard at asterisk.org
Mon Nov 26 10:35:58 CST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2207/
-----------------------------------------------------------

Review request for Asterisk Developers, Mark Michelson and Matt Jordan.


Summary
-------

The cause of this is fairly simple and the behavior appears to have been introduced with the allowmultiplelogin option (prior to this, the assumption was just always that simultaneous logins agains the same account were allowed). What happens is there is in fact a session going even before any have been authenticated, the session is just against the user with a zero length name and this session is returned as valid from the check_manager_session_inuse function.

It might be more appropriate in this case to change the check_manager_session_inuse function to automatically return 0 when the name given is an empty string instead. Let me know if you think this is the case. The check_manager_session_inuse function is only used in this one instance though.


This addresses bug ASTERISK-20677.
    https://issues.asterisk.org/jira/browse/ASTERISK-20677


Diffs
-----

  /branches/1.8/main/manager.c 376616 

Diff: https://reviewboard.asterisk.org/r/2207/diff


Testing
-------

Tested challenge, logoff, and login with no username specified before and after the patch. The patch makes the behavior of these commands match up with what would be received with the allowmultiplelogin option set to yes.


Thanks,

jrose

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121126/272e5fea/attachment-0001.htm>


More information about the asterisk-dev mailing list