* Adjust etag generation to produce identical results on 32-bit and 64-bit
platforms and avoid a regression with conditional PUT's on lock and etag.
Add a warning to the documentation of FileETAG that changes of the ETAG
format can cause conditionals to fail on mod_dav_fs provided backends.
PR: 44152
Submitted by: Michael Clark <michael metaparadigm.com>
eviewed by: rpluem, niq, wrowe
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@608059
13f79535-47bb-0310-9956-
ffa450edef68
mod_imagemap: Fix a cross-site scripting issue. Reported by JPCERT.
[Joe Orton]
+ *) mod_dav: Adjust etag generation to produce identical results on 32-bit
+ and 64-bit platforms and avoid a regression with conditional PUT's on lock
+ and etag. PR 44152.
+ [Michael Clark <michael metaparadigm.com>, Ruediger Pluem]
+
*) log.c: Ensure Win32 resurrects its lost robust logger processes.
[William Rowe]
Trunk version of patch works
+1: rpluem, niq, wrowe
- * mod_dav_fs: Adjust etag generation to produce identical results on 32-bit
- and 64-bit platforms. Avoid a regression with conditional PUT's on lock
- and etag (because we have a regression otherwise this is a showstopper).
- PR 44152
- Trunk version of patch:
- http://svn.apache.org/viewvc?rev=607437&view=rev
- Backport version for 2.2.x of patch:
- Trunk version of patch works
- +1: rpluem, niq, wrowe
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
the setting for that subdirectory (which will be inherited by
any sub-subdirectories that don't override it) will be equivalent to
<code>FileETag MTime Size</code>.</p>
+ <note type="warning"><title>Warning</title>
+ Do not change the default for directories or locations that have WebDAV
+ enabled and use <module>mod_dav_fs</module> as a storage provider.
+ <module>mod_dav_fs</module> uses <code>INode MTime Size</code>
+ as a fixed format for <code>ETag</code> comparisons on conditional requests.
+ These conditional requests will break if the <code>ETag</code> format is
+ changed via <directive>FileETag</directive>.
+ </note>
</usage>
</directivesynopsis>
return apr_pstrdup(ctx->pool, "");
if (ctx->finfo.filetype != 0) {
- return apr_psprintf(ctx->pool, "\"%lx-%lx-%lx\"",
- (unsigned long) ctx->finfo.inode,
- (unsigned long) ctx->finfo.size,
- (unsigned long) ctx->finfo.mtime);
+ return apr_psprintf(ctx->pool, "\"%" APR_UINT64_T_HEX_FMT "-%"
+ APR_UINT64_T_HEX_FMT "-%" APR_UINT64_T_HEX_FMT "\"",
+ (apr_uint64_t) ctx->finfo.inode,
+ (apr_uint64_t) ctx->finfo.size,
+ (apr_uint64_t) ctx->finfo.mtime);
}
- return apr_psprintf(ctx->pool, "\"%lx\"", (unsigned long) ctx->finfo.mtime);
+ return apr_psprintf(ctx->pool, "\"%" APR_UINT64_T_HEX_FMT "\"",
+ (apr_uint64_t) ctx->finfo.mtime);
}
static const dav_hooks_repository dav_hooks_repository_fs =