-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat: Add IFilenameValidator
to have one consistent place for filename validation
#46371
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
susnux
requested review from
a team,
ArtificialOwl,
yemkareems,
sorbaugh and
come-nc
and removed request for
a team
July 9, 2024 11:47
susnux
force-pushed
the
feat/filename-validator
branch
from
July 9, 2024 11:51
0392d91
to
11e4757
Compare
come-nc
reviewed
Jul 9, 2024
come-nc
reviewed
Jul 9, 2024
Follow up with usage here: #46375 |
come-nc
reviewed
Jul 9, 2024
susnux
force-pushed
the
feat/filename-validator
branch
from
July 9, 2024 12:34
7e4fdb8
to
5d3a0ae
Compare
…ame validation Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
susnux
force-pushed
the
feat/filename-validator
branch
from
July 9, 2024 13:04
91820db
to
46f1efa
Compare
come-nc
approved these changes
Jul 9, 2024
sorbaugh
approved these changes
Jul 10, 2024
nickvergessen
added
pending documentation
This pull request needs an associated documentation update
and removed
pending documentation
This pull request needs an associated documentation update
labels
Jul 18, 2024
Merged
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is the first part, split #45151 to make review easier.
This adds a new interface
IFilenameValidator
that allows validating filenames to have one consistent location for filename handling.We need two¹ functions:
if
with boolean return¹ We need in some rare private filesystem locations a third function: We need to check if a file is forbidden but can not validate all other restrictions, because we use our filesystem API also for setup where we use possibly forbidden characters as we are only setup Nextcloud itself not files later synced.
Checklist