Skip to content

Conversation

@phil-davis
Copy link
Contributor

Description

In the JS for the UI, do not allow the forward slash when renaming or creating a new file.

Related Issue

#28475

Motivation and Context

Trying to use relative paths like "foldera/x.txt" when renaming a file, or creating a new text file with the UI is not supposed to be a "feature" and causes various issues in the UI after such a file action.

How Has This Been Tested?

JS tests verify that "/" is disallowed by isFileNameValid.
Tried renaming and create text file in the UI to verify it really is banned now.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks good but Travis/Selenium seems to have trouble

@phil-davis
Copy link
Contributor Author

phil-davis commented Jul 25, 2017

There is a test that tries to rename "data.zip" to "lorem/txt". Actually as it turns out that used to fail because there is no folder named "lorem" to put a file called "txt" into.
Now it fails in a different (better) way that the test needs to understand.

@phil-davis
Copy link
Contributor Author

UI tests sorted to test the various tooltip messages that come up when various invalid things are typed in the rename text box. Hopefully all the CI will pass now.

@phil-davis phil-davis merged commit 0e2caca into master Jul 26, 2017
@phil-davis phil-davis deleted the no-slash-in-rename-box branch July 26, 2017 05:39
@phil-davis
Copy link
Contributor Author

Backport to stable10 in #28490

@phil-davis
Copy link
Contributor Author

@PVince81 do we backport stuff like this to 9.1.* ?

@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants