Skip to content

Conversation

@ArielLeyva
Copy link
Contributor

@ArielLeyva ArielLeyva commented Sep 19, 2025

Closes #5306

Description

This pull request fixes a bug that allowed users to rename files or directories using the / character. Previously, entering / in the new name would unintentionally create a new file or folder in a different path, rather than renaming the original item. This behavior has now been corrected by validating the input and disallowing invalid characters such as /.

Additional Information

  1. Added a validation check to prevent renaming with forbidden characters.
  2. The character / is now explicitly blocked to avoid path traversal issues.
  3. Ensures that renamed items remain in their original location and do not result in unintended file creation.
image

Checklist

Before submitting your PR, please indicate which issues are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.

  • I am aware the project is currently in maintenance-only mode. See README
  • I am aware that translations MUST be made through Transifex and that this PR is NOT a translation update
  • I am making a PR against the master branch.
  • I am sure File Browser can be successfully built. See builds and development.

@hacdias
Copy link
Member

hacdias commented Sep 20, 2025

Hi! I liked the idea in #5372 more. Why did you choose to close that PR and open this one instead?

@ArielLeyva
Copy link
Contributor Author

Hi! I liked the idea in #5372 more. Why did you choose to close that PR and open this one instead?

I decided to close the PR because it didn’t meet the translation requirements set by Transifex, and I had unintentionally combined bug fixes with new feature implementations in the same changeset. To keep things clean and maintainable, I’ve opened two separate PRs: one addressing the bug described in issue #5306, and another introducing a new feature that improves clarity when creating new files and directories.

@hacdias
Copy link
Member

hacdias commented Sep 25, 2025

I assume this one is no longer needed, since #5451 has been merged and we now clearly show where the files/directories are being created. Closing it.

@hacdias hacdias closed this Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected Behavior when changing folder and filenames in filebrowser

2 participants