the key contains a newline.
PR: 14453
Submitted originally by: Cedric Gavage <cedric.gavage@unixtech.be>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100833
13f79535-47bb-0310-9956-
ffa450edef68
[Remove entries to the current 2.0 section below, when backported]
+ *) 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]
+
*) Install config.nice into the build/ directory to make
minor version upgrades easier. [Joshua Slive]
* 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 == NULL || fpout == NULL) {
+ if (fpin == NULL || fpout == NULL || ap_strchr(key, '\n')) {
return NULL;
}