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

refactor: Migrate some legacy and core functions to IFilenameValidator #46571

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jul 17, 2024

Summary

Some more functions that can be migrated to the new validator instead of using private API.

Checklist

@susnux susnux added 3. to review Waiting for reviews feature: files 🍂 2024-Autumn ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Jul 17, 2024
@susnux susnux added this to the Nextcloud 30 milestone Jul 17, 2024
lib/private/legacy/OC_Helper.php Dismissed Show dismissed Hide dismissed
@susnux susnux force-pushed the chore/migrate-to-filenamevalidator branch 2 times, most recently from 3391efc to e323421 Compare July 17, 2024 11:27
@@ -189,8 +189,7 @@ public function postAvatar(?string $path = null): JSONResponse {
} elseif (!is_null($files)) {
if (
$files['error'][0] === 0 &&
is_uploaded_file($files['tmp_name'][0]) &&
!\OC\Files\Filesystem::isFileBlacklisted($files['tmp_name'][0])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to check here as this is auto generated

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the chore/migrate-to-filenamevalidator branch from e323421 to 9716b0d Compare July 19, 2024 17:41
@sorbaugh sorbaugh merged commit 9ed2d3e into master Jul 22, 2024
167 checks passed
@sorbaugh sorbaugh deleted the chore/migrate-to-filenamevalidator branch July 22, 2024 08:40
@blizzz blizzz mentioned this pull request Jul 24, 2024
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 feature: files ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) 🍂 2024-Autumn
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants