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 filename validation from Storage and Util to FilenameValidator #46538

Merged
merged 3 commits into from
Jul 16, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jul 15, 2024

Summary

  1. Migrate verifyPath logic from common storage to FilenameValidator
  2. Migrate from deprecated OCP\Util to FilenameValidator and remove the loong depreated method.

In a follow up I will remove to usage of OC in OCA\Files but this requires a library update (so we can use capabilities instead of the initial state).

Checklist

@@ -355,10 +355,13 @@
return $this->info->getOwner();
}

protected function verifyPath() {
protected function verifyPath(?string $path = null) {

Check notice

Code scanning / Psalm

MissingReturnType Note

Method OCA\DAV\Connector\Sabre\Node::verifyPath does not have a return type, expecting void
@susnux susnux force-pushed the fix/use-filename-validator branch from abc3227 to e00f6ad Compare July 15, 2024 15:56
@susnux susnux added bug 3. to review Waiting for reviews ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Jul 15, 2024
@susnux susnux added this to the Nextcloud 30 milestone Jul 15, 2024
…meValidator`

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…o `FilenameValidator`

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/use-filename-validator branch from e00f6ad to 52c92e4 Compare July 16, 2024 10:49
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/use-filename-validator branch from 52c92e4 to 322b394 Compare July 16, 2024 10:57
@susnux susnux merged commit 1b41e8f into master Jul 16, 2024
166 checks passed
@susnux susnux deleted the fix/use-filename-validator branch July 16, 2024 15:42
@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 bug ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants