File apache2-CVE-2024-38476-2.patch of Package apache2.34771

Index: httpd-2.4.23/include/httpd.h
===================================================================
--- httpd-2.4.23.orig/include/httpd.h
+++ httpd-2.4.23/include/httpd.h
@@ -660,6 +660,14 @@ struct ap_method_list_t {
  * The type used for request binary notes.
  */
 typedef apr_uint64_t ap_request_bnotes_t;
+
+/**
+ * These constants represent bitmasks for notes associated with this
+ * request. There are space for 64 bits in the apr_uint64_t.
+ *
+ */
+#define AP_REQUEST_TRUSTED_CT  1 << 1
+
 /**
  * This is a convenience macro to ease with getting specific request
  * binary notes.
@@ -673,6 +681,12 @@ typedef apr_uint64_t ap_request_bnotes_t
  */
 #define AP_REQUEST_SET_BNOTE(r, mask, val) \
     (r)->bnotes = (((r)->bnotes & ~(mask)) | (val))
+
+/**
+ * Returns true if the content-type field is from a trusted source
+ */
+#define AP_REQUEST_IS_TRUSTED_CT(r) \
+    (!!AP_REQUEST_GET_BNOTE((r), AP_REQUEST_TRUSTED_CT))
 /** @} */
 
 /**
openSUSE Build Service is sponsored by