Post request now validates scripts
This commit is contained in:
parent
7e9d9e3568
commit
606226b1c4
|
@ -65,11 +65,6 @@ elseif ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
$nextrunObj = new DateTime($_POST['nextrun']);
|
$nextrunObj = new DateTime($_POST['nextrun']);
|
||||||
$nextrun = $nextrunObj->getTimestamp();
|
$nextrun = $nextrunObj->getTimestamp();
|
||||||
|
|
||||||
if(filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
|
|
||||||
header("location:addjob.php?error=invalidurl");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!is_numeric($delay)) {
|
if(!is_numeric($delay)) {
|
||||||
header("location:addjob.php?error=invaliddelay");
|
header("location:addjob.php?error=invaliddelay");
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -73,11 +73,6 @@ elseif ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
$nextrunObj = new DateTime($_POST['nextrun']);
|
$nextrunObj = new DateTime($_POST['nextrun']);
|
||||||
$nextrun = $nextrunObj->getTimestamp();
|
$nextrun = $nextrunObj->getTimestamp();
|
||||||
|
|
||||||
if(filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
|
|
||||||
header("location:editjob.php?jobID=" . $jobID . "&error=invalidurl");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!is_numeric($delay)) {
|
if(!is_numeric($delay)) {
|
||||||
header("location:editjob.php?jobID=" . $jobID . "&error=invaliddelay");
|
header("location:editjob.php?jobID=" . $jobID . "&error=invaliddelay");
|
||||||
exit;
|
exit;
|
||||||
|
|
Loading…
Reference in New Issue