You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by po...@apache.org on 2009/09/09 15:04:35 UTC
svn commit: r812934 - in /httpd/httpd/trunk: CHANGES
modules/aaa/mod_auth_digest.c
Author: poirier
Date: Wed Sep 9 13:04:34 2009
New Revision: 812934
URL: http://svn.apache.org/viewvc?rev=812934&view=rev
Log:
mod_auth_digest: When qop is none, client doesn't send nonce count,
but module was segfaulting trying to check the nonce count anyway.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=812934&r1=812933&r2=812934&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Sep 9 13:04:34 2009
@@ -2,6 +2,8 @@
Changes with Apache 2.3.3
+ *) mod_auth_digest: Fix null pointer when qop=none. [Dan Poirier]
+
*) Add support for HTTP PUT to ab. [Jeff Barnes <jbarnesweb yahoo.com>]
*) ServerTokens now accepts 'Off' which disables sending of
Modified: httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_auth_digest.c?rev=812934&r1=812933&r2=812934&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_digest.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_digest.c Wed Sep 9 13:04:34 2009
@@ -1436,6 +1436,20 @@
return OK;
}
+ if ((conf->qop_list != NULL)
+ &&(conf->qop_list[0] != NULL)
+ &&!strcasecmp(conf->qop_list[0], "none")) {
+ /* qop is none, client must not send a nonce count */
+ if (snc != NULL) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Digest: invalid nc %s received - no nonce count allowed when qop=none",
+ snc);
+ return !OK;
+ }
+ /* qop is none, cannot check nonce count */
+ return OK;
+ }
+
nc = strtol(snc, &endptr, 16);
if (endptr < (snc+strlen(snc)) && !apr_isspace(*endptr)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,