Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security hole found #771

Closed
wiormax opened this issue Apr 9, 2022 · 1 comment
Closed

security hole found #771

wiormax opened this issue Apr 9, 2022 · 1 comment

Comments

@wiormax
Copy link

wiormax commented Apr 9, 2022

you can edit any file even if you have excluded in $exclude_items in fact you can edit index.php if that is the name of your tinyfilemanager file so my solution will avoid this issue

chenge this

// file editor from
if ($file == '' || !is_file($path . '/' . $file)) { fm_set_msg(lng('File not found'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); }

// file editor to
if ($file == '' || !is_file($path . '/' . $file) || in_array($file, $GLOBALS['exclude_items'])) { fm_set_msg(lng('File not found'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); }

good luck

@wiormax wiormax closed this as completed Apr 9, 2022
@wiormax wiormax reopened this Apr 9, 2022
@prasathmani
Copy link
Owner

This issue is addressed in the new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants