Notifications: revised operation

Add security
This commit is contained in:
bergware
2023-02-10 16:52:50 +01:00
parent 87baaee543
commit 389024d75e
+1 -1
View File
@@ -48,7 +48,7 @@ case 'get':
break;
case 'hide':
$file = $_POST['file'];
if (file_exists($file)) chmod($file,0000);
if (file_exists($file) && pathinfo($file)['extension']=='notify') chmod($file,0000);
break;
case 'archive':
shell_exec("$notify archive ".escapeshellarg($_POST['file']));