Skip to content

Commit

Permalink
Bugfix: Restrict find_full_subnets.php to CLI
Browse files Browse the repository at this point in the history
find_full_subnets.php does not verify if the user is authorized to access the data, and if the script was started from a command line.

Reported by ovprophet
  • Loading branch information
GaryAllan committed Feb 3, 2023
1 parent f1d3b0f commit 3df854d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions/scripts/find_full_subnets.php
@@ -1,5 +1,8 @@
<?php

# script can only be run from cli
if(php_sapi_name()!="cli") { die("This script can only be run from cli!"); }

# include required scripts
require_once( dirname(__FILE__) . '/../functions.php' );

Expand Down Expand Up @@ -40,4 +43,3 @@
// do something with output
print_r($out);
}
?>
1 change: 1 addition & 0 deletions misc/CHANGELOG
Expand Up @@ -3,6 +3,7 @@
Security Fixes:
----------------------------
+ XSS (reflected) in 'bw-calulator-result.php';
+ Restrict find_full_subnets.php to CLI;

== 1.5.0

Expand Down

0 comments on commit 3df854d

Please sign in to comment.