File php8-CVE-2025-1736.patch of Package php8.37961

Index: php-8.0.30/ext/standard/http_fopen_wrapper.c
===================================================================
--- php-8.0.30.orig/ext/standard/http_fopen_wrapper.c
+++ php-8.0.30/ext/standard/http_fopen_wrapper.c
@@ -107,7 +107,7 @@ static inline void strip_header(char *he
 static zend_bool check_has_header(const char *headers, const char *header) {
 	const char *s = headers;
 	while ((s = strstr(s, header))) {
-		if (s == headers || *(s-1) == '\n') {
+		if (s == headers || (*(s-1) == '\n' && *(s-2) == '\r')) {
 			return 1;
 		}
 		s++;
openSUSE Build Service is sponsored by