mirror of
https://github.com/thewesker/greptweet.git
synced 2025-12-20 12:11:05 -05:00
Thanks to Claudio Mettler for pointing out I've had a PHP vulnerabilty in my code for years
This commit is contained in:
2
grep.php
2
grep.php
@@ -3,7 +3,7 @@ header('Content-type: application/json');
|
|||||||
if (empty($_GET['q'])) { die(); }
|
if (empty($_GET['q'])) { die(); }
|
||||||
|
|
||||||
// Is this the correct way to sanitise args to shell from PHP?
|
// Is this the correct way to sanitise args to shell from PHP?
|
||||||
$QUERY=urldecode(escapeshellarg(urlencode($_GET['q'])));
|
$QUERY=escapeshellarg($_GET['q']);
|
||||||
|
|
||||||
// Debug Logging
|
// Debug Logging
|
||||||
//$fp = fopen('debug.log', 'a');
|
//$fp = fopen('debug.log', 'a');
|
||||||
|
|||||||
Reference in New Issue
Block a user