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/10 14:12:59 UTC
svn commit: r813396 - in /httpd/httpd/trunk: CHANGES
docs/manual/mod/mod_auth_digest.xml modules/aaa/mod_auth_digest.c
Author: poirier
Date: Thu Sep 10 12:12:58 2009
New Revision: 813396
URL: http://svn.apache.org/viewvc?rev=813396&view=rev
Log:
Fail server startup when mod_auth_digest is unable to
provide the security checks configured.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/docs/manual/mod/mod_auth_digest.xml
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=813396&r1=813395&r2=813396&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Sep 10 12:12:58 2009
@@ -2,6 +2,10 @@
Changes with Apache 2.3.3
+ *) mod_auth_digest: Fail server start when nonce count checking
+ is configured without shared memory, or md5-sess algorithm is
+ configured. [Dan Poirier]
+
*) mod_proxy_connect: The connect method doesn't work if the client is
connecting to the apache proxy through an ssl socket. Fixed.
PR29744. [Brad Boyer, Mark Cave-Ayland, Julian Gilbey, Fabrice Durand,
Modified: httpd/httpd/trunk/docs/manual/mod/mod_auth_digest.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_auth_digest.xml?rev=813396&r1=813395&r2=813396&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_auth_digest.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_auth_digest.xml Thu Sep 10 12:12:58 2009
@@ -88,6 +88,8 @@
support digest authentication. Since digest authentication is not as
widely implemented as basic authentication, you should use it only
in environments where all users will have supporting browsers.</p>
+ <p><module>mod_auth_digest</module> only works properly on platforms
+ where APR supports shared memory.</p>
</note>
</section>
@@ -329,7 +331,7 @@
server.</p>
<p>The <var>size</var> is normally expressed in Bytes, but you
- may let the number follow a <code>K</code> or an <code>M</code> to
+ may follow the number with a <code>K</code> or an <code>M</code> to
express your value as KBytes or MBytes. For example, the following
directives are all equivalent:</p>
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=813396&r1=813395&r2=813396&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_digest.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_digest.c Thu Sep 10 12:12:58 2009
@@ -592,13 +592,13 @@
static const char *set_nc_check(cmd_parms *cmd, void *config, int flag)
{
- if (flag && !client_shm) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
- cmd->server, "Digest: WARNING: nonce-count checking "
+#if !APR_HAS_SHARED_MEMORY
+ if (flag) {
+ return "AuthDigestNcCheck: ERROR: nonce-count checking "
"is not supported on platforms without shared-memory "
- "support - disabling check");
- flag = 0;
+ "support";
}
+#endif
((digest_config_rec *) config)->check_nc = flag;
return NULL;
@@ -607,13 +607,8 @@
static const char *set_algorithm(cmd_parms *cmd, void *config, const char *alg)
{
if (!strcasecmp(alg, "MD5-sess")) {
- if (!client_shm) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
- cmd->server, "Digest: WARNING: algorithm `MD5-sess' "
- "is not supported on platforms without shared-memory "
- "support - reverting to MD5");
- alg = "MD5";
- }
+ return "AuthDigestAlgorithm: ERROR: algorithm `MD5-sess' "
+ "is not fully implemented";
}
else if (strcasecmp(alg, "MD5")) {
return apr_pstrcat(cmd->pool, "Invalid algorithm in AuthDigestAlgorithm: ", alg, NULL);
@@ -1432,6 +1427,13 @@
const char *snc = resp->nonce_count;
char *endptr;
+ if (conf->check_nc && !client_shm) {
+ /* Shouldn't happen, but just in case... */
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "Digest: cannot check nonce count without shared memory");
+ return OK;
+ }
+
if (!conf->check_nc || !client_shm) {
return OK;
}