[go: nahoru, domu]

Skip to content

Commit

Permalink
Don't report X-Content-Type-Options for non 200 OK responses sullo#803
Browse files Browse the repository at this point in the history
  • Loading branch information
sullo committed Dec 30, 2023
1 parent 7e3eae4 commit b11e74c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions program/plugins/nikto_headers.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ sub nikto_headers_postfetch {
}

# Look for X-Frame-Options
if (!$XFRAME{ $mark->{hostname} }{ $mark->{port} } && defined $result->{'whisker'}->{'code'} && $result->{'whisker'}->{'code'} == 200) {
if (!$XFRAME{ $mark->{hostname} }{ $mark->{port} }
&& defined $result->{'whisker'}->{'code'}
&& $result->{'whisker'}->{'code'} == 200) {
if (defined $result->{'x-frame-options'}) {
add_vulnerability(
$mark,
Expand Down Expand Up @@ -387,7 +389,8 @@ sub nikto_headers_postfetch {

# X-Content-Type-Options
if (!$HEADERS_XCTO{ $mark->{hostname} }{ $mark->{port} }
&& defined $result->{'whisker'}->{'code'}) {
&& defined $result->{'whisker'}->{'code'}
&& $result->{'whisker'}->{'code'} == 200) {
if (!defined $result->{'x-content-type-options'}) {
add_vulnerability(
$mark,
Expand Down

0 comments on commit b11e74c

Please sign in to comment.