mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-12-24 00:59:48 +01:00
Advanced Search not working for read-only users #1325
This commit is contained in:
@@ -459,7 +459,7 @@ unset($p, $use_auth, $iconv_input_encoding, $use_highlightjs, $highlightjs_style
|
|||||||
/*************************** ACTIONS ***************************/
|
/*************************** ACTIONS ***************************/
|
||||||
|
|
||||||
// Handle all AJAX Request
|
// Handle all AJAX Request
|
||||||
if ((isset($_SESSION[FM_SESSION_ID]['logged'], $auth_users[$_SESSION[FM_SESSION_ID]['logged']]) || !FM_USE_AUTH) && isset($_POST['ajax'], $_POST['token']) && !FM_READONLY) {
|
if ((isset($_SESSION[FM_SESSION_ID]['logged'], $auth_users[$_SESSION[FM_SESSION_ID]['logged']]) || !FM_USE_AUTH) && isset($_POST['ajax'], $_POST['token'])) {
|
||||||
if (!verifyToken($_POST['token'])) {
|
if (!verifyToken($_POST['token'])) {
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
die("Invalid Token.");
|
die("Invalid Token.");
|
||||||
@@ -473,6 +473,10 @@ if ((isset($_SESSION[FM_SESSION_ID]['logged'], $auth_users[$_SESSION[FM_SESSION_
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(FM_READONLY){
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
// save editor file
|
// save editor file
|
||||||
if (isset($_POST['type']) && $_POST['type'] == "save") {
|
if (isset($_POST['type']) && $_POST['type'] == "save") {
|
||||||
// get current path
|
// get current path
|
||||||
|
|||||||
Reference in New Issue
Block a user