Projects
home:rottame:vhosts-ng:php80
php8
php8-CVE-2026-128064.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php8-CVE-2026-128064.patch of Package php8
From cb68a63e8177f9dc25aba23c0d79c7da82ea69db Mon Sep 17 00:00:00 2001 From: Jakub Zelenka <bukka@php.net> Date: Fri, 6 Nov 2026 21:46:18 +0100 Subject: [PATCH] Fix GHSA-f6gg-rchx-xw8j: mixed case HTTPS and FTPS Determine TLS use from a case-insensitive comparison of the complete URL scheme, preventing mixed-case HTTPS and FTPS URLs from downgrading to plaintext. Add regression tests for both wrappers. --- ext/standard/ftp_fopen_wrapper.c | 2 +- ext/standard/http_fopen_wrapper.c | 2 +- .../tests/http/ghsa-f6gg-rchx-xw8j.phpt | 61 +++++++++++++++++++ .../tests/streams/ghsa-f6gg-rchx-xw8j.phpt | 34 +++++++++++ 4 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 ext/standard/tests/http/ghsa-f6gg-rchx-xw8j.phpt create mode 100644 ext/standard/tests/streams/ghsa-f6gg-rchx-xw8j.phpt Index: php-8.0.30/ext/standard/ftp_fopen_wrapper.c =================================================================== --- php-8.0.30.orig/ext/standard/ftp_fopen_wrapper.c +++ php-8.0.30/ext/standard/ftp_fopen_wrapper.c @@ -141,7 +141,7 @@ static php_stream *php_ftp_fopen_connect return NULL; } - use_ssl = resource->scheme && (ZSTR_LEN(resource->scheme) > 3) && ZSTR_VAL(resource->scheme)[3] == 's'; + use_ssl = resource->scheme && zend_string_equals_literal_ci(resource->scheme, "ftps"); /* use port 21 if one wasn't specified */ if (resource->port == 0) 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 @@ -429,7 +429,7 @@ static php_stream *php_stream_url_wrap_h request_fulluri = zend_is_true(tmpzval); } - use_ssl = resource->scheme && (ZSTR_LEN(resource->scheme) > 4) && ZSTR_VAL(resource->scheme)[4] == 's'; + use_ssl = zend_string_equals_literal_ci(resource->scheme, "https"); /* choose default ports */ if (use_ssl && resource->port == 0) resource->port = 443;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.