-
Notifications
You must be signed in to change notification settings - Fork 25
fix: do error on upload when a tag is not found anymore #1212
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
Conversation
|
/backport to stable31 |
|
/backport to stable30 |
|
/backport to stable29 |
|
Because it could have security implication via access control I think breaking is better? |
nickvergessen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But otherwise fine by me if CI is fixed.
Good point. Still requires that a tag is being deleted pro-actively. Maybe an addition could be to check whether a tag is being used in a (accesscontrol) flow operation, when attempting to delete it. Both operations can be used in user as well as admin scope, might be hard to evaluate or even influence from an admin point of view. |
869fe55 to
e7ced62
Compare
|
/backport to stable32 |
- als removes a listener to CacheEntryInsertedEvent since CacheEntryUpdatedEvent will be called as well - logs a warning instead Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
e7ced62 to
3beb8e7
Compare
|
|
||
| #[\Override] | ||
| public function register(IRegistrationContext $context): void { | ||
| $context->registerEventListener(CacheEntryInsertedEvent::class, CacheListener::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related?
fixes #1211
Example log statements:
{"reqId":"BXmsa5WqWcnyRe88EESb","level":2,"time":"2025-08-06T15:41:15+00:00","remoteAddr":"127.0.0.1","user":"spider","app":"files_automatedtagging","method":"PUT","url":"/remote.php/dav/files/spider/CanIHaz/error(2).jpeg","message":"The tag to assign (ID 77) cannot be found anymore. The related rule is owned by spider.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0","version":"32.0.0.1","data":{"app":"files_automatedtagging"}} {"reqId":"BXmsa5WqWcnyRe88EESb","level":2,"time":"2025-08-06T15:41:16+00:00","remoteAddr":"127.0.0.1","user":"spider","app":"files_automatedtagging","method":"PUT","url":"/remote.php/dav/files/spider/CanIHaz/error(2).jpeg","message":"The tag to assign (ID 106) cannot be found anymore. The related rule is global.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0","version":"32.0.0.1","data":{"app":"files_automatedtagging"}}Also comes with a little log spamming prevention, as the source events are apprently issued twice at least.