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

askama_escape Why escape slashes? #245

Closed
mashedcode opened this issue Jun 7, 2019 · 3 comments · Fixed by #486
Closed

askama_escape Why escape slashes? #245

mashedcode opened this issue Jun 7, 2019 · 3 comments · Fixed by #486

Comments

@mashedcode
Copy link
Contributor

Sorry, I just don't seem to understand what harm slashes can do in html.

Why does it escape slashes?

@djc
Copy link
Collaborator

djc commented Jun 7, 2019

@djc djc closed this as completed Jun 7, 2019
@mashedcode
Copy link
Contributor Author

OWASP Cross Site Scripting Prevention Cheat Sheet
Yes they do indeed.
But not in there XSS Experimental Minimal Encoding Rules.

Furthermore I don't see anyone provide an actual attack on Security Stack Exchange that was enabled due to unescaped /. So I don't agree.

If I agree or not doesn't matter though since the OWASP recommends doing so.
It would still be nice to have a minimal escape version of that function.
The reason for this is that I simply don't want my slashes inside of src and href to be escaped. It's simply useless.

@djc
Copy link
Collaborator

djc commented Jun 7, 2019

You could write your own filter that does more minimal escaping and returns the result as a MarkupDisplay::Safe, I think.

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 a pull request may close this issue.

2 participants