PR: 14453
Reviewed by: Jeff Trawick, Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@102279
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 1.3.30
+ *) mod_rewrite: In external rewrite maps lookup keys containing
+ a newline now cause a lookup failure. PR 14453.
+ [Cedric Gavage <cedric.gavage unixtech.be>, André Malo]
+
*) Forensic logging module added (mod_log_forensic).
[Ben Laurie]
* context then the rewritemap-programs were not spawned.
* In this case using such a map (usually in per-dir context)
* is useless because it is not available.
+ *
+ * newlines in the key leave bytes in the pipe and cause
+ * bad things to happen (next map lookup will use the chars
+ * after the \n instead of the new key etc etc - in other words,
+ * the Rewritemap falls out of sync with the requests).
*/
- if (fpin == -1 || fpout == -1) {
+ if (fpin == -1 || fpout == -1 || strchr(key, '\n')) {
return NULL;
}
-
+
/* take the lock */
rewritelock_alloc(r);