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

fix(RichObjectStrings/Validator): Validate key value types of rich object parameters #47662

Merged

Conversation

provokateurin
Copy link
Member

Summary

A lot of apps set invalid rich object parameters for notifications. Most common are integer ids were the casting was forgotten.

Technically this is not a breaking change since the apps triggering this behavior are just broken, but we are way to late into the cycle to backport this to 30 and have everyone fix their apps, so I'm not doing that (let alone backport it to older versions).

Not sure if this needs to have some upgrade docs, please let me know.

Checklist

@provokateurin provokateurin added bug 3. to review Waiting for reviews labels Aug 31, 2024
@provokateurin provokateurin added this to the Nextcloud 31 milestone Aug 31, 2024
@provokateurin provokateurin requested review from nickvergessen, danxuliu, a team, icewind1991, sorbaugh and come-nc and removed request for a team August 31, 2024 15:05
@provokateurin provokateurin force-pushed the fix/notification/validate-rich-object-key-value-types branch from 5be384e to 3f50f62 Compare September 2, 2024 05:01
@provokateurin
Copy link
Member Author

One non-breaking backportable alternative would be to just cast the keys and values automatically and only log a debug messages. That doesn't force everyone to immediately fix their apps and we could still make it throw an error later when hopefully everyone has seen the debug logs.

@provokateurin provokateurin force-pushed the fix/notification/validate-rich-object-key-value-types branch from 3f50f62 to 7264f5f Compare September 2, 2024 13:14
@provokateurin provokateurin changed the title fix(Notification): Validate key value types of rich object parameters fix(RichObjectStrings/Validator): Validate key value types of rich object parameters Sep 2, 2024
@provokateurin
Copy link
Member Author

Adjusted all the other uses of the validator to have the right types.

@provokateurin provokateurin force-pushed the fix/notification/validate-rich-object-key-value-types branch from ce94955 to a3da745 Compare September 10, 2024 14:38
@provokateurin provokateurin merged commit 979cc87 into master Sep 10, 2024
174 checks passed
@provokateurin provokateurin deleted the fix/notification/validate-rich-object-key-value-types branch September 10, 2024 15:40
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants