Skip to content

Show warning if slash is entered as filename - #7676

Merged
rullzer merged 2 commits into
masterfrom
fix-slash-in-filename
Jan 3, 2018
Merged

Show warning if slash is entered as filename#7676
rullzer merged 2 commits into
masterfrom
fix-slash-in-filename

Conversation

@MorrisJobke

Copy link
Copy Markdown
Member

Fixes#6594 when creating or renaming a file.

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

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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

codecovBot commented Jan 3, 2018

Copy link
Copy Markdown

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 FilesCoverage ΔComplexity Δ
.../dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php78.94% <ø> (ø)6 <0> (ø)⬇️
lib/private/Files/Cache/Propagator.php94.93% <0%> (-1.27%)16% <0%> (ø)
core/js/js.js65.88% <0%> (ø)0% <0%> (ø)⬇️
lib/private/Template/JSConfigHelper.php0% <0%> (ø)18% <0%> (+1%)⬆️
...leware/Security/PasswordConfirmationMiddleware.php82.35% <0%> (ø)6% <0%> (?)
...e/AppFramework/DependencyInjection/DIContainer.php78.6% <0%> (+0.77%)27% <0%> (ø)⬇️
apps/files_trashbin/lib/Expiration.php91.93% <0%> (+1.61%)29% <0%> (ø)⬇️
...amework/Middleware/Security/SecurityMiddleware.php80.26% <0%> (+2.48%)25% <0%> (-2%)⬇️
...ware/Security/Exceptions/NotConfirmedException.php100% <0%> (+100%)1% <0%> (ø)⬇️

@MorrisJobke

Copy link
Copy Markdown
MemberAuthor

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

@skjnldsvskjnldsv left a comment

Copy link
Copy Markdown
Member

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 masterJan 3, 2018
@rullzer
rullzer deleted the fix-slash-in-filename branch January 3, 2018 12:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@MorrisJobke@MariusBluem@rullzer@blizzz@skjnldsv