Skip to content

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

Merged
provokateurin merged 4 commits into
masterfrom
fix/notification/validate-rich-object-key-value-types
Sep 10, 2024
Merged

fix(RichObjectStrings/Validator): Validate key value types of rich object parameters#47662
provokateurin merged 4 commits into
masterfrom
fix/notification/validate-rich-object-key-value-types

Conversation

@provokateurin

Copy link
Copy Markdown
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

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

Copy link
Copy Markdown
MemberAuthor

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.

Comment threadlib/private/Notification/Notification.php Outdated
@provokateurin
provokateurinforce-pushed the fix/notification/validate-rich-object-key-value-types branch from 3f50f62 to 7264f5fCompareSeptember 2, 2024 13:14
@provokateurinprovokateurin changed the title fix(Notification): Validate key value types of rich object parametersfix(RichObjectStrings/Validator): Validate key value types of rich object parametersSep 2, 2024
@provokateurin

Copy link
Copy Markdown
MemberAuthor

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

…ject parameters
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin
provokateurinforce-pushed the fix/notification/validate-rich-object-key-value-types branch from ce94955 to a3da745CompareSeptember 10, 2024 14:38
@provokateurin
provokateurin merged commit 979cc87 into masterSep 10, 2024
@provokateurin
provokateurin deleted the fix/notification/validate-rich-object-key-value-types branch September 10, 2024 15:40
@skjnldsvskjnldsv mentioned this pull request Jan 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@provokateurin@nickvergessen@come-nc