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

Handle ?url query string for css-fixme, #847 #852

Merged
merged 2 commits into from
Dec 17, 2015
Merged

Handle ?url query string for css-fixme, #847 #852

merged 2 commits into from
Dec 17, 2015

Conversation

hallvors
Copy link
Contributor

No description provided.

@miketaylr
Copy link
Member

Looks great! Any feedback, @karlcow?

@@ -5,6 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import json
import requests

This comment was marked as abuse.

@hallvors
Copy link
Contributor Author

Should be OK to merge, only failure on Travis is the one about wrong selector in Github test which is fixed in #851

@miketaylr
Copy link
Member

This branch has conflicts that must be resolved

@hallvors can you rebase and fix conflicts before we pull this in, please?

@miketaylr
Copy link
Member

The problem is that TEXTAREA will render those entities in the content - literally, so escaping everything will mangle any CSS code that contains <>&. Hence div > p would show up as div > p in the generated output.

Is that true? Every browser I tested does the "right" thing here, and if I copy and paste I get unescaped entities (which is what I would expect).

data:text/html,<textarea>&lt;script&gt;alert(0)&lt;/script&gt;</textarea>:


I'd feel a lot better if we just escape all instances of <, > and & -- XSS paranoia seems like a good policy.

@miketaylr
Copy link
Member

(I guess this PR is out of sync with #850, which was just merged -- rebasing against master should help here. These patches still have the inline click handlers, etc.)

@hallvors
Copy link
Contributor Author

Is that true? Every browser I tested does the "right" thing here

Strange. I'm sure I saw the opposite while testing in Orlando - I'm even sure @karlcow was sitting next to me and saw it too. Had I somehow added a double escaping? :-o

@hallvors
Copy link
Contributor Author

We're using the Flask templating engine and it's escaping input by default (unless you jump through some hoops to avoid that by passing in Markup class objects or something). So yes, we ended up with a double escape which confused me.

@hallvors
Copy link
Contributor Author

@miketaylr should be fine to merge now - not sure what the two failures on Travis are about but they are definitely not related to this patch..

@miketaylr
Copy link
Member

We're using the Flask templating engine and it's escaping input by default (unless you jump through some hoops to avoid that by passing in Markup class objects or something). So yes, we ended up with a double escape which confused me.

Ah yeah, that seems confusing, thanks for looking into it. 👍

not sure what the two failures on Travis are about but they are definitely not related to this patch

Looks like the PR failure was a pep8 failure. But I see you've fixed it so the push build passed. Let me just retrigger the PR build then we should be good to merge.

@miketaylr
Copy link
Member

(oops, was looking at wrong build. yes, unrelated failures indeed)

miketaylr pushed a commit that referenced this pull request Dec 17, 2015
Handle ?url query string for css-fixme, #847
@miketaylr miketaylr merged commit 84b8bc5 into master Dec 17, 2015
@miketaylr miketaylr deleted the fixmyurl branch December 17, 2015 16:10
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.

3 participants