68c84b
diff -Nru httpd-2.4.52.orig/build/rules.mk.in httpd-2.4.52/build/rules.mk.in
68c84b
--- httpd-2.4.52.orig/build/rules.mk.in	2012-09-26 16:30:31.000000000 +0200
68c84b
+++ httpd-2.4.52/build/rules.mk.in	2022-02-18 18:06:00.504146481 +0100
68c84b
@@ -26,6 +26,10 @@
68c84b
 # (per-subdirectory) settings through definitions in modules.mk, with highest
68c84b
 # precedence.
68c84b
 #
68c84b
+
68c84b
+# Always link modules w/ apr and aprutil
68c84b
+MOD_LIBS = -lapr-1 -laprutil-1
68c84b
+
68c84b
 ALL_CFLAGS   = $(MOD_CFLAGS) $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)
68c84b
 ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(MOD_CPPFLAGS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
68c84b
 ALL_CXXFLAGS = $(MOD_CXXFLAGS) $(EXTRA_CXXFLAGS) $(NOTEST_CXXFLAGS) $(CXXFLAGS)
68c84b
@@ -50,8 +54,8 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
 # Link-related commands
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
 
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
 LINK     = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(PILDFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
-SH_LINK  = $(SH_LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) $(SH_LIBS) -o $@
68c84b
-MOD_LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) -static $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+SH_LINK  = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) $(SH_LIBS) -o $@
68c84b
+MOD_LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) -static $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ $(SH_LDFLAGS) $(CORE_IMPLIB) $(SH_LIBS) $(MOD_LIBS)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
 
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
 # Cross compile commands
68c84b
 
68c84b
diff -Nru httpd-2.4.52.orig/server/test_char.h httpd-2.4.52/server/test_char.h
68c84b
--- httpd-2.4.52.orig/server/test_char.h	1970-01-01 01:00:00.000000000 +0100
68c84b
+++ httpd-2.4.52/server/test_char.h	2022-02-18 18:02:05.446590626 +0100
68c84b
@@ -0,0 +1,53 @@
68c84b
+/* this file is automatically generated by gen_test_char, do not edit */
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_ESCAPE_SHELL_CMD     (1)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_ESCAPE_PATH_SEGMENT  (2)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_OS_ESCAPE_PATH       (4)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_HTTP_TOKEN_STOP      (8)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_ESCAPE_LOGITEM       (16)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_ESCAPE_FORENSIC      (32)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_ESCAPE_URLENCODED    (64)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_HTTP_CTRLS           (128)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+#define T_VCHAR_OBSTEXT        (256)
68c84b
+#define T_URI_UNRESERVED       (512)
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+static const unsigned short test_char_table[256] = {
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x0a8,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x0fe,0x07e,0x0ff,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,0x0fe,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x00e,0x140,0x15f,0x146,0x141,0x166,0x141,0x141,
68c84b
+    0x149,0x149,0x101,0x140,0x148,0x300,0x300,0x14a,
68c84b
+    0x300,0x300,0x300,0x300,0x300,0x300,0x300,0x300,
68c84b
+    0x300,0x300,0x168,0x14b,0x14f,0x148,0x14f,0x14f,
68c84b
+    0x148,0x300,0x300,0x300,0x300,0x300,0x300,0x300,
68c84b
+    0x300,0x300,0x300,0x300,0x300,0x300,0x300,0x300,
68c84b
+    0x300,0x300,0x300,0x300,0x300,0x300,0x300,0x300,
68c84b
+    0x300,0x300,0x300,0x14f,0x15f,0x14f,0x147,0x300,
68c84b
+    0x147,0x300,0x300,0x300,0x300,0x300,0x300,0x300,
68c84b
+    0x300,0x300,0x300,0x300,0x300,0x300,0x300,0x300,
68c84b
+    0x300,0x300,0x300,0x300,0x300,0x300,0x300,0x300,
68c84b
+    0x300,0x300,0x300,0x14f,0x167,0x14f,0x341,0x0fe,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,
68c84b
+    0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e,0x17e 
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
+};
68c84b
+
68c84b
+/* we assume the folks using this ensure 0 <= c < 256... which means
68c84b
+ * you need a cast to (unsigned char) first, you can't just plug a
68c84b
+ * char in here and get it to work, because if char is signed then it
68c84b
+ * will first be sign extended.
68c84b
+ */
68c84b
+#define TEST_CHAR(c, f) (test_char_table[(unsigned char)(c)] & (f))