Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blizzz
Copy link
Member

@blizzz blizzz commented Aug 6, 2025

  • als removes a listener to CacheEntryInsertedEvent since CacheEntryUpdatedEvent will be called as well
  • logs a warning instead

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.

- als removes a listener to CacheEntryInsertedEvent since
  CacheEntryUpdatedEvent will be called as well
- logs a warning instead

Signed-off-by: Arthur Schiwon <[email protected]>
@blizzz
Copy link
Member Author

blizzz commented Aug 6, 2025

/backport to stable31

@blizzz
Copy link
Member Author

blizzz commented Aug 6, 2025

/backport to stable30

@blizzz
Copy link
Member Author

blizzz commented Aug 6, 2025

/backport to stable29

@nickvergessen
Copy link
Member

Because it could have security implication via access control I think breaking is better?

Copy link
Member

@nickvergessen nickvergessen left a 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.

@blizzz
Copy link
Member Author

blizzz commented Aug 7, 2025

Because it could have security implication via access control I think breaking is better?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: workflow engine break upload when condition isn't met anymore
2 participants