Skip to content

Commit

Permalink
Protect: no empty headers (#14859)
Browse files Browse the repository at this point in the history
* Protect

We should never send an empty header to the Protect server.
It can result in false positives for misconfigured servers.

* Update modules/protect.php

Co-Authored-By: Jeremy Herve <jeremy@jeremy.hu>

Co-authored-by: Jeremy Herve <jeremy@tagada.hu>
  • Loading branch information
roccotripaldi and jeherve authored Mar 5, 2020
1 parent 698a72b commit 7968380
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/protect.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function get_headers() {
);

foreach ( $ip_related_headers as $header ) {
if ( isset( $_SERVER[ $header ] ) ) {
if ( ! empty( $_SERVER[ $header ] ) ) {
$output[ $header ] = $_SERVER[ $header ];
}
}
Expand Down

0 comments on commit 7968380

Please sign in to comment.