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

Show warning if slash is entered as filename #7676

Merged
merged 2 commits into from
Jan 3, 2018
Merged

Conversation

MorrisJobke
Copy link
Member

Fixes #6594 when creating or renaming a file.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke MorrisJobke added the 3. to review Waiting for reviews label Jan 3, 2018
@MorrisJobke MorrisJobke added this to the Nextcloud 13 milestone Jan 3, 2018
@MariusBluem
Copy link
Member

For now, fine 😉 But what do you think about creating a directory with that file when somebody types in "testfolder/testdoc.docx" as document name 🤔 @MorrisJobke

@MorrisJobke
Copy link
Member Author

For now, fine 😉 But what do you think about creating a directory with that file when somebody types in "testfolder/testdoc.docx" as document name 🤔 @MorrisJobke

Something for later and also a bit over the top from my point of view.

* hides log entries for the case the parent folder does not exist

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@codecov
Copy link

codecov bot commented Jan 3, 2018

Codecov Report

Merging #7676 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master   #7676      +/-   ##
===========================================
+ Coverage     51.19%   51.2%   +0.01%     
- Complexity    24888   24893       +5     
===========================================
  Files          1601    1602       +1     
  Lines         94781   94803      +22     
  Branches       1371    1372       +1     
===========================================
+ Hits          48523   48544      +21     
- Misses        46258   46259       +1
Impacted Files Coverage Δ Complexity Δ
.../dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php 78.94% <ø> (ø) 6 <0> (ø) ⬇️
lib/private/Files/Cache/Propagator.php 94.93% <0%> (-1.27%) 16% <0%> (ø)
core/js/js.js 65.88% <0%> (ø) 0% <0%> (ø) ⬇️
lib/private/Template/JSConfigHelper.php 0% <0%> (ø) 18% <0%> (+1%) ⬆️
...leware/Security/PasswordConfirmationMiddleware.php 82.35% <0%> (ø) 6% <0%> (?)
...e/AppFramework/DependencyInjection/DIContainer.php 78.6% <0%> (+0.77%) 27% <0%> (ø) ⬇️
apps/files_trashbin/lib/Expiration.php 91.93% <0%> (+1.61%) 29% <0%> (ø) ⬇️
...amework/Middleware/Security/SecurityMiddleware.php 80.26% <0%> (+2.48%) 25% <0%> (-2%) ⬇️
...ware/Security/Exceptions/NotConfirmedException.php 100% <0%> (+100%) 1% <0%> (ø) ⬇️

@MorrisJobke
Copy link
Member Author

The second commit fixes all the cases of #6594 (comment) and logs them as debug logs.

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Strange it was not already implemented! 🤔

@rullzer rullzer merged commit a8ab67f into master Jan 3, 2018
@rullzer rullzer deleted the fix-slash-in-filename branch January 3, 2018 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants