-
Notifications
You must be signed in to change notification settings - Fork 1
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(web-twig): Remove raw
filter that cause a XSS issue
#742
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
literat
requested review from
adamkudrna,
crishpeen,
tomassychra and
a team
as code owners
March 22, 2023 22:02
✅ Deploy Preview for spirit-design-system-storybook canceled.
|
✅ Deploy Preview for spirit-design-system-demo canceled.
|
literat
commented
Mar 23, 2023
dlouhak
reviewed
Mar 23, 2023
packages/web-twig/src/Resources/components/Accordion/Accordion.twig
Outdated
Show resolved
Hide resolved
packages/web-twig/src/Resources/components/CheckboxField/CheckboxField.twig
Outdated
Show resolved
Hide resolved
literat
commented
Mar 23, 2023
literat
commented
Mar 23, 2023
packages/web-twig/src/Resources/components/ButtonLink/ButtonLink.twig
Outdated
Show resolved
Hide resolved
literat
commented
Mar 23, 2023
packages/web-twig/src/Resources/components/Header/_abstracts/Link.twig
Outdated
Show resolved
Hide resolved
literat
commented
Mar 23, 2023
literat
force-pushed
the
fix/web-twig-raw-issue
branch
3 times, most recently
from
March 23, 2023 19:46
489fdee
to
897a720
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, specify better doc (rule out magical) and answer my question about onClick :) thank you
packages/web-twig/src/Resources/components/CheckboxField/README.md
Outdated
Show resolved
Hide resolved
@kdosiodjinud I have added a branch which you can test in your application https://github.com/lmc-eu/spirit-web-twig-bundle/tree/fix/web-twig-raw-issue |
literat
force-pushed
the
fix/web-twig-raw-issue
branch
from
March 31, 2023 08:34
340d2f7
to
ae65213
Compare
vmilersky
requested changes
Mar 31, 2023
packages/web-twig/src/Resources/components/ButtonLink/ButtonLink.twig
Outdated
Show resolved
Hide resolved
packages/web-twig/src/Resources/components/TextFieldBase/TextFieldBase.twig
Outdated
Show resolved
Hide resolved
packages/web-twig/src/Resources/components/TextFieldBase/README.md
Outdated
Show resolved
Hide resolved
literat
force-pushed
the
fix/web-twig-raw-issue
branch
from
March 31, 2023 15:51
51881b5
to
afb1b3d
Compare
* UNSAFE_label - unescaped label with `raw` filter * UNSAFE_helperText - unescaped helper text with `raw` filter * UNSAFE_message - unescaped validation message with `raw` filter refs #DS-645
* use native `onclick` attribute instead * deprecation will be removed in the next major version refs #DS-645
literat
force-pushed
the
fix/web-twig-raw-issue
branch
from
April 3, 2023 08:06
afb1b3d
to
0e6d244
Compare
vmilersky
approved these changes
Apr 3, 2023
literat
added a commit
that referenced
this pull request
May 5, 2023
* while removing double quotes in #742 we let Twig to escape our attributes automagically * this lead us to bug where double quotes where missing in HTML output for `placeholder` attribute and thus from multiple words of placeholder only first was displayed * we are moving back and returning double quotes to concatenation of attributes while also adding the escape functionality * because of custom fabrication of the HTML tags and using double quotes and Twig's automated escaping we must escape values by ourselves * @see: https://twig.symfony.com/doc/3.x/filters/escape.html -> Caution * `{{ var|escape(strategy)|raw }} {# won't be double-escaped #}` * @see: #742 refs #DS-760
literat
added a commit
that referenced
this pull request
May 9, 2023
* while removing double quotes in #742 we let Twig to escape our attributes automagically * this lead us to bug where double quotes where missing in HTML output for `placeholder` attribute and thus from multiple words of placeholder only first was displayed * we are moving back and returning double quotes to concatenation of attributes while also adding the escape functionality * because of custom fabrication of the HTML tags and using double quotes and Twig's automated escaping we must escape values by ourselves * @see: https://twig.symfony.com/doc/3.x/filters/escape.html -> Caution * `{{ var|escape(strategy)|raw }} {# won't be double-escaped #}` * @see: #742 refs #DS-760
literat
added a commit
that referenced
this pull request
May 16, 2023
* while removing double quotes in #742 we let Twig to escape our attributes automagically * this lead us to bug where double quotes where missing in HTML output for `placeholder` attribute and thus from multiple words of placeholder only first was displayed * we are moving back and returning double quotes to concatenation of attributes while also adding the escape functionality * because of custom fabrication of the HTML tags and using double quotes and Twig's automated escaping we must escape values by ourselves * @see: https://twig.symfony.com/doc/3.x/filters/escape.html -> Caution * `{{ var|escape(strategy)|raw }} {# won't be double-escaped #}` * @see: #742 refs #DS-760
literat
added a commit
that referenced
this pull request
May 16, 2023
* while removing double quotes in #742 we let Twig to escape our attributes automagically * this lead us to bug where double quotes where missing in HTML output for `placeholder` attribute and thus from multiple words of placeholder only first was displayed * we are moving back and returning double quotes to concatenation of attributes while also adding the escape functionality * because of custom fabrication of the HTML tags and using double quotes and Twig's automated escaping we must escape values by ourselves * @see: https://twig.symfony.com/doc/3.x/filters/escape.html -> Caution * `{{ var|escape(strategy)|raw }} {# won't be double-escaped #}` * @see: #742 refs #DS-760
literat
added a commit
that referenced
this pull request
May 18, 2023
* while removing double quotes in #742 we let Twig to escape our attributes automagically * this lead us to bug where double quotes where missing in HTML output for `placeholder` attribute and thus from multiple words of placeholder only first was displayed * we are moving back and returning double quotes to concatenation of attributes while also adding the escape functionality * because of custom fabrication of the HTML tags and using double quotes and Twig's automated escaping we must escape values by ourselves * @see: https://twig.symfony.com/doc/3.x/filters/escape.html -> Caution * `{{ var|escape(strategy)|raw }} {# won't be double-escaped #}` * @see: #742 refs #DS-760
literat
added a commit
that referenced
this pull request
May 18, 2023
* while removing double quotes in #742 we let Twig to escape our attributes automagically * this lead us to bug where double quotes where missing in HTML output for `placeholder` attribute and thus from multiple words of placeholder only first was displayed * we are moving back and returning double quotes to concatenation of attributes while also adding the escape functionality * because of custom fabrication of the HTML tags and using double quotes and Twig's automated escaping we must escape values by ourselves * @see: https://twig.symfony.com/doc/3.x/filters/escape.html -> Caution * `{{ var|escape(strategy)|raw }} {# won't be double-escaped #}` * @see: #742 refs #DS-760
literat
added a commit
to lmc-eu/spirit-web-twig-bundle
that referenced
this pull request
May 18, 2023
* while removing double quotes in #742 we let Twig to escape our attributes automagically * this lead us to bug where double quotes where missing in HTML output for `placeholder` attribute and thus from multiple words of placeholder only first was displayed * we are moving back and returning double quotes to concatenation of attributes while also adding the escape functionality * because of custom fabrication of the HTML tags and using double quotes and Twig's automated escaping we must escape values by ourselves * @see: https://twig.symfony.com/doc/3.x/filters/escape.html -> Caution * `{{ var|escape(strategy)|raw }} {# won't be double-escaped #}` * @see: lmc-eu/spirit-design-system#742 refs #DS-760
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.