-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Open
Copy link
Labels
Milestone
Description
We're validating that we're not following a redirect from https to http.
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs
Lines 133 to 134 in 5ebfca2
| // Disallow automatic redirection from secure to non-secure schemes | |
| if (HttpUtilities.IsSupportedSecureScheme(requestUri.Scheme) && !HttpUtilities.IsSupportedSecureScheme(location.Scheme)) |
We should also check that the new request url scheme is valid at all, as we do before sending the initial request
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs
Lines 680 to 683 in 5ebfca2
| if (!HttpUtilities.IsSupportedScheme(requestUri.Scheme)) | |
| { | |
| return new NotSupportedException(SR.Format(SR.net_http_unsupported_requesturi_scheme, requestUri.Scheme)); | |
| } |