Skip to content
Snippets Groups Projects
Commit ad7186ec authored by Brett Bieber's avatar Brett Bieber
Browse files

Remove flush. Check for valid URL before running.

parent 944bc073
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,6 @@ class UNL_WDN_Assessment_PageLogger extends Spider_LoggerAbstract ...@@ -15,7 +15,6 @@ class UNL_WDN_Assessment_PageLogger extends Spider_LoggerAbstract
function log($uri, $depth, DOMXPath $xpath) function log($uri, $depth, DOMXPath $xpath)
{ {
flush();
echo PHP_EOL.'|'.str_repeat('-', $depth).$uri; echo PHP_EOL.'|'.str_repeat('-', $depth).$uri;
$this->assessment->addUri($uri); $this->assessment->addUri($uri);
} }
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require_once 'config.inc.php'; require_once 'config.inc.php';
$uri = ''; $uri = '';
if (isset($_GET['uri'])) { if (isset($_GET['uri'])
&& preg_match('/https?:\/\//', $_GET['uri'])) {
$uri = htmlentities($_GET['uri'], ENT_QUOTES); $uri = htmlentities($_GET['uri'], ENT_QUOTES);
} }
?> ?>
...@@ -30,7 +31,7 @@ if (!empty($uri)) { ...@@ -30,7 +31,7 @@ if (!empty($uri)) {
$assessment->checkInvalid(); $assessment->checkInvalid();
} else { } else {
if (isset($_GET['rescan'])) { if (isset($_GET['rescan'])) {
$assessment->removeEntries(); //$assessment->removeEntries();
} }
$assessment->logPages(); $assessment->logPages();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment