Module: sip-router Branch: master Commit: 87ee74902ef5c4a86fc3130a48ab783b1c605461 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=87ee74902ef5c4a86fc3130a48ab783b1c605461
Author: Michal Matyska <[email protected]> Committer: Michal Matyska <[email protected]> Date: Mon Apr 11 10:20:43 2011 -0500 handle all cases after auth_api.pre_auth call Added cases NO_CREDENTIALS, STALE_NONCE and NONCE_REUSED to the switch. This prevents segfault after uninitialized var is used in gen_ha1 when the code continues to check the credentials if there were none. --- modules_s/auth_db/authorize.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/modules_s/auth_db/authorize.c b/modules_s/auth_db/authorize.c index da1d6b4..1d3add1 100644 --- a/modules_s/auth_db/authorize.c +++ b/modules_s/auth_db/authorize.c @@ -345,10 +345,14 @@ static inline int authenticate(struct sip_msg* msg, str* realm, authdb_table_inf ret = -2; goto end; + case STALE_NONCE: case NOT_AUTHENTICATED: + case NO_CREDENTIALS: ret = -1; goto end; + case NONCE_REUSED: + DBG("auth_db:authenticate: NONCE_REUSED\n"); case DO_AUTHENTICATION: break; _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
