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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Kevin P. Fleming 18 years ago
parent 95db093c40
commit 0e39aced3c

@ -8328,11 +8328,11 @@ static enum check_auth_result check_auth(struct sip_pvt *p, struct sip_request *
} }
/* Ok, we have a bad username/secret pair */ /* Ok, we have a bad username/secret pair */
/* Challenge again, and again, and again */ /* Tell the UAS not to re-send this authentication data, because
transmit_response_with_auth(p, response, req, p->randdata, reliable, respheader, 0); it will continue to fail
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); */
return AUTH_CHALLENGE_SENT; return AUTH_SECRET_FAILED;
} }
/*! \brief Change onhold state of a peer using a pvt structure */ /*! \brief Change onhold state of a peer using a pvt structure */

Loading…
Cancel
Save