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

Disables auto sanitizing for Annotation API #22552

Merged
merged 5 commits into from
Sep 6, 2024
Merged

Disables auto sanitizing for Annotation API #22552

merged 5 commits into from
Sep 6, 2024

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Sep 4, 2024

Description:

This PR disables auto sanitizing for the Annotation API and adds a lot of type hinting to ensure the parameters have the correct type.

The note of an annotation is still sanitized manually before it is stored.
When migrating the annotations into a new database table, we should consider removing that and add a sanitizing on output instead. refs #19306

In addition this PR limits the annotation note to 255 chars, so we can easily migrate that to a VARCHAR column later.

Review

@sgiehl sgiehl added this to the 5.2.0 milestone Sep 4, 2024
@sgiehl sgiehl added Needs Review PRs that need a code review Technical debt Issues the will help to reduce technical debt labels Sep 4, 2024
@sgiehl sgiehl marked this pull request as ready for review September 4, 2024 14:10
@sgiehl sgiehl requested a review from a team September 4, 2024 14:11
Copy link
Contributor

@caddoo caddoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach of introducing stricter typing, also fine with sanitizing on input for this particular case

@sgiehl sgiehl merged commit 330596d into 5.x-dev Sep 6, 2024
23 of 25 checks passed
@sgiehl sgiehl deleted the dev-18470 branch September 6, 2024 10:05
sgiehl added a commit that referenced this pull request Sep 6, 2024
* Improve type hinting for Annotation API and limit message to 255 chars

* shorten message to 255 chars

* adjust tests

* updates expected UI test file

* cs
sgiehl added a commit that referenced this pull request Sep 7, 2024
* Disables auto sanitizing for Annotation API (#22552)

* Improve type hinting for Annotation API and limit message to 255 chars

* shorten message to 255 chars

* adjust tests

* updates expected UI test file

* cs

* updates expected UI test file
valentinab25 pushed a commit to valentinab25/matomo that referenced this pull request Jan 27, 2025
* Improve type hinting for Annotation API and limit message to 255 chars

* shorten message to 255 chars

* adjust tests

* updates expected UI test file

* cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review Technical debt Issues the will help to reduce technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants