Skip to content

Commit dd79258

Browse files
authored
Advanced Search not working for read-only users #1325
1 parent dd2e227 commit dd79258

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tinyfilemanager.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ function getClientIP()
459459
/*************************** ACTIONS ***************************/
460460

461461
// Handle all AJAX Request
462-
if ((isset($_SESSION[FM_SESSION_ID]['logged'], $auth_users[$_SESSION[FM_SESSION_ID]['logged']]) || !FM_USE_AUTH) && isset($_POST['ajax'], $_POST['token']) && !FM_READONLY) {
462+
if ((isset($_SESSION[FM_SESSION_ID]['logged'], $auth_users[$_SESSION[FM_SESSION_ID]['logged']]) || !FM_USE_AUTH) && isset($_POST['ajax'], $_POST['token'])) {
463463
if (!verifyToken($_POST['token'])) {
464464
header('HTTP/1.0 401 Unauthorized');
465465
die("Invalid Token.");
@@ -473,6 +473,10 @@ function getClientIP()
473473
exit();
474474
}
475475

476+
if(FM_READONLY){
477+
exit();
478+
}
479+
476480
// save editor file
477481
if (isset($_POST['type']) && $_POST['type'] == "save") {
478482
// get current path

0 commit comments

Comments
 (0)