mirror of
https://github.com/curl/curl.git
synced 2026-08-26 20:23:32 +03:00
cookie: use origin scheme for secure context check
`Curl_secure_context()` checked `conn->scheme` to determine if Secure cookies may be sent. Since73daec6, `conn->scheme` is set to the proxy's scheme when using an HTTPS forwarding proxy, causing the function to return TRUE for HTTP origins. This leaked Secure cookies over the plaintext connection between proxy and origin. Use `data->state.origin->scheme` instead, which always reflects the origin's scheme regardless of proxy configuration. Not an approved vulnerability because the regression was introduced after the last release and is not present in any released version. Verified by test 3401 Follow-up to73daec6620Reported-by: daviey on hackerone URL: https://hackerone.com/reports/3803415 Closes #22024
This commit is contained in:
parent
50ffc359e9
commit
b9702f8c48
5 changed files with 64 additions and 11 deletions
|
|
@ -109,7 +109,7 @@ struct connectdata;
|
|||
* are only used if the header boolean is TRUE.
|
||||
*/
|
||||
|
||||
bool Curl_secure_context(const struct connectdata *conn, const char *host);
|
||||
bool Curl_secure_context(struct Curl_easy *data, const char *host);
|
||||
CURLcode Curl_cookie_add(struct Curl_easy *data,
|
||||
struct CookieInfo *ci,
|
||||
bool httpheader,
|
||||
|
|
@ -119,7 +119,6 @@ CURLcode Curl_cookie_add(struct Curl_easy *data,
|
|||
const char *path,
|
||||
bool secure) WARN_UNUSED_RESULT;
|
||||
CURLcode Curl_cookie_getlist(struct Curl_easy *data,
|
||||
const struct connectdata *conn,
|
||||
bool *okay, const char *host,
|
||||
struct Curl_llist *list) WARN_UNUSED_RESULT;
|
||||
void Curl_cookie_clearall(struct CookieInfo *ci);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue