]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fix regression in 2.4.56
authorEric Covener <covener@apache.org>
Thu, 30 Mar 2023 20:32:19 +0000 (20:32 +0000)
committerEric Covener <covener@apache.org>
Thu, 30 Mar 2023 20:32:19 +0000 (20:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908813 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/rewrite-qsd-regression.diff [new file with mode: 0644]
modules/mappers/mod_rewrite.c

diff --git a/changes-entries/rewrite-qsd-regression.diff b/changes-entries/rewrite-qsd-regression.diff
new file mode 100644 (file)
index 0000000..0e4fe1a
--- /dev/null
@@ -0,0 +1,3 @@
+  *) mod_rewrite: Fix a 2.4.56 regression for substitutions ending
+     in a question mark. [Eric Covener]
+
index af77e58eebe485611314930697a077adc14d5e03..827239d9dbf9186688aa04fd1526a03dacc49f0b 100644 (file)
@@ -3911,6 +3911,7 @@ static const char *cmd_rewriterule(cmd_parms *cmd, void *in_dconf,
     if (*(a2_end-1) == '?') {
         /* a literal ? at the end of the unsubstituted rewrite rule */
         newrule->flags |= RULEFLAG_QSNONE;
+        *(a2_end-1) = '\0'; /* trailing ? has done its job */
     }
     else if (newrule->flags & RULEFLAG_QSDISCARD) {
         if (NULL == ap_strchr(newrule->output, '?')) {