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

Rector rule added to escape unsafe output in phtml files #472

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Commits on Nov 15, 2023

  1. This rule escapes output using ->escapeHtml output function. It shoul…

    …d be run only in phtml files because right now it will do this for whichever php file you provide. That is untested. You can take look at associated tests for which scenarios are covered. escapeJs and escapeUrl are yet to be implemented
    Abhishek Jakhotiya committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    8fb1e13 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. Fixed phpcs errors and warnings because of which the merge checks wer…

    …e failing
    Abhishek Jakhotiya committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    e8232c6 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Added tests for different kind of expressions possible in echo statem…

    …ent.
    
    We are not trying to fix all the unsafe output. We try to escape output that we can be sure of. We leave complex expressions as it is. Developer can for now fix
    them manually. As of now it should cover 70% of cases. Escaping xss in URL will be handled as a separate rule.
    Abhishek Jakhotiya committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    9780610 View commit details
    Browse the repository at this point in the history
  2. Fixed phpcs sniffs w.r.t to docblocks and spacing

    Abhishek Jakhotiya committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    5ddc480 View commit details
    Browse the repository at this point in the history