Skip to content

Commit

Permalink
tls_validate_record_header(): Check for all HTTP methods
Browse files Browse the repository at this point in the history
The change checks for all HTTP methods in ssl_record, not only GET, POST,
PUT and HEAD. (additionally PATCH, DELETE, OPTIONS and TRACE)

CLA: trivial

Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl/openssl#26968)
  • Loading branch information
daum3ns authored and t8m committed Mar 5, 2025
1 parent e599893 commit 30fbc68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ssl/record/methods/tlsany_meth.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ static int tls_validate_record_header(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rec)
if (HAS_PREFIX((char *)p, "GET ") ||
HAS_PREFIX((char *)p, "POST ") ||
HAS_PREFIX((char *)p, "HEAD ") ||
HAS_PREFIX((char *)p, "PATCH") ||
HAS_PREFIX((char *)p, "OPTIO") ||
HAS_PREFIX((char *)p, "DELET") ||
HAS_PREFIX((char *)p, "TRACE") ||
HAS_PREFIX((char *)p, "PUT ")) {
RLAYERfatal(rl, SSL_AD_NO_ALERT, SSL_R_HTTP_REQUEST);
return 0;
Expand Down

0 comments on commit 30fbc68

Please sign in to comment.