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

Disable escaping for ogns variable #32

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

revoltek-daniel
Copy link
Contributor

disable escaping to preserve quotes in html attribute

disable escaping to preserve quotes in html attribute
@tractorcow
Copy link
Owner

This could potentially change the default escaping for the entire object; Potentially creating a severe XSS vulnerability.

What quotes do you think should not be escaped safely?

@tractorcow
Copy link
Owner

Can I suggest this

private static $casting = [
    'OGNS' => 'HTMLFragment',
];

That will not affect any other property. :)

@revoltek-daniel
Copy link
Contributor Author

revoltek-daniel commented Feb 25, 2021

Looks like the better way to do it. I've changed it.

I'm pretty new to silverstripe so I did not recognize that there are more than the OGNS variable.

@tractorcow tractorcow merged commit 143b483 into tractorcow:master Feb 25, 2021
@tractorcow
Copy link
Owner

Thanks @revoltek-daniel !

@revoltek-daniel revoltek-daniel deleted the patch-1 branch March 3, 2021 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants