Skip to content

Conversation

cedric-anne
Copy link
Member

Checklist before requesting a review

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

Follows #20577 .

$msg parameter of the Session::addMessageAfterRedirect() method is not checked because its content is printed either in a Twig or a JS file, and Psalm is not able to follow the variable through all this logic.

It is necessary to indicate that this parameter has to be a safe HTML string.

@cedric-anne cedric-anne self-assigned this Aug 6, 2025
@cedric-anne cedric-anne force-pushed the 11.0/detect-unescaped-session-messages branch from 25a1100 to 40ce6ec Compare August 12, 2025 12:05
@cedric-anne cedric-anne changed the title Add Psalm annotations to detect unescaped session messages Fix unescaped session messages Aug 12, 2025
@cedric-anne cedric-anne marked this pull request as ready for review August 12, 2025 12:08
@cedric-anne cedric-anne merged commit b5b20b1 into glpi-project:11.0/bugfixes Aug 12, 2025
8 checks passed
@cedric-anne cedric-anne deleted the 11.0/detect-unescaped-session-messages branch August 12, 2025 13:00
@cedric-anne cedric-anne added this to the 11.0.0 milestone Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants