[asterisk-commits] kpfleming: branch 1.4 r81442 - /branches/1.4/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 4 11:40:40 CDT 2007
Author: kpfleming
Date: Tue Sep 4 11:40:39 2007
New Revision: 81442
URL: http://svn.digium.com/view/asterisk?view=rev&rev=81442
Log:
there is no point in sending 401 Unauthorized to a UAS that sent us a properly-formatted Authentication header with the expected username and nonce but an incorrect response (which indicates the shared secret does not match)... instead, let's send 403 Forbidden so that the UAS doesn't retry with the same authentication credentials repeatedly
Modified:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=81442&r1=81441&r2=81442
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Tue Sep 4 11:40:39 2007
@@ -8328,11 +8328,11 @@
}
/* Ok, we have a bad username/secret pair */
- /* Challenge again, and again, and again */
- transmit_response_with_auth(p, response, req, p->randdata, reliable, respheader, 0);
- sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
-
- return AUTH_CHALLENGE_SENT;
+ /* Tell the UAS not to re-send this authentication data, because
+ it will continue to fail
+ */
+
+ return AUTH_SECRET_FAILED;
}
/*! \brief Change onhold state of a peer using a pvt structure */
More information about the asterisk-commits
mailing list