Skip to content

Commit

Permalink
Subfolder links fix (#945)
Browse files Browse the repository at this point in the history
Download and Direct link problems when using with a subfolder, possible simple solution.
  • Loading branch information
cataalin authored Jan 19, 2023
1 parent 313acf1 commit 69495db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tinyfilemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ function getClientIP() {
if (isset($auth_users[$_POST['fm_usr']]) && isset($_POST['fm_pwd']) && password_verify($_POST['fm_pwd'], $auth_users[$_POST['fm_usr']]) && verifyToken($_POST['token'])) {
$_SESSION[FM_SESSION_ID]['logged'] = $_POST['fm_usr'];
fm_set_msg(lng('You are logged in'));
fm_redirect(FM_ROOT_URL . $_SERVER['REQUEST_URI']);
fm_redirect(FM_ROOT_URL);
} else {
unset($_SESSION[FM_SESSION_ID]['logged']);
fm_set_msg(lng('Login failed. Invalid username or password'), 'error');
fm_redirect(FM_ROOT_URL . $_SERVER['REQUEST_URI']);
fm_redirect(FM_ROOT_URL);
}
} else {
fm_set_msg(lng('password_hash not supported, Upgrade PHP version'), 'error');;
Expand Down

0 comments on commit 69495db

Please sign in to comment.