Re:If your code accepts URIs as input, filter out “file://”
by gsnedders on Monday September 12, 2016 @12:22PM
(#12481018)
Hopefully the URL spec (https://url.spec.whatwg.org) is helpful here in finding other potentially unsafe behaviours that browsers have, though given much of it seems to be dealing with the fact that urllib.urlparse doesn't match what browsers do in many, many ways it's probably of limited help. (Nobody really implements it yet; it's just an attempt at standardising rough intersection semantics of what browsers currently do. Eventually, however, it should suffice, once legacy browsers eventually die.)
[ Parent
| on HN ]
Re:If your code accepts URIs as input, filter out “file://”
by kuschku on Monday September 12, 2016 @12:40PM
(#12481202)
That URL spec is just "this is what chrome does, everyone repeat that".
They’re unwilling to modify anything, or standardize anything, but just want to cement the current piece of shit that URL parsing it for the future.
Re:If your code accepts URIs as input, filter out “file://”
by jcranmer on Monday September 12, 2016 @03:57PM
(#12483133)
WHATWG standards are generally formed by starting from what the 4 major browsers (Chrome, Firefox, IE (Edge), Safari) do. Anything that is done in common by all of them gets implemented no problem. It's when they all differ that the editor(s) tries to come up with more reasoned algorithms.
Re:If your code accepts URIs as input, filter out “file://”
by dragonwriter on Monday September 12, 2016 @04:08PM
(#12483203)
> WHATWG standards are generally formed by starting from what the 4 major browsers (Chrome, Firefox, IE (Edge), Safari) do.
I thought WHATWG standards are formed by starting with what the four major browser vendors agree to do, not what they currently do (though usually at least one has an implementation before something gets proposed for standardization.)
Re:If your code accepts URIs as input, filter out “file://”
by kuschku on Monday September 12, 2016 @04:05PM
(#12483178)
Which is not really ideal.
Standards aren’t about documenting what is, but about defining what will be.