Skip to content

Commit

Permalink
Fix H2 authority check condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Petrov committed Apr 28, 2023
1 parent 8a994b7 commit 5dde7e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fw/http_limits.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ frang_http_host_check(const TfwHttpReq *req, FrangAcc *ra)
* Note: check_authority_correctness() already ensures that
* at least one of :authority or Host headers are not empty.
*/
if (TFW_STR_EMPTY(&authority) || TFW_STR_EMPTY(&host)
|| tfw_strcmp(&authority, &host) != 0)
if (!TFW_STR_EMPTY(&authority) && !TFW_STR_EMPTY(&host)
&& tfw_strcmp(&authority, &host) != 0)
frang_msg("Request :authority differs from Host",
&FRANG_ACC2CLI(ra)->addr, "\n");
return TFW_BLOCK;
Expand Down

0 comments on commit 5dde7e8

Please sign in to comment.