[Merge] lp:~abreu-alexandre/webbrowser-app/hostmapping-webview into lp:webbrowser-app
Alexandre Abreu
alexandre.abreu at canonical.com
Wed Nov 19 15:05:50 UTC 2014
> In UbuntuWebPluginContext::isValidHostMappingRule(…):
>
> 86 + if (parts.count() < 3 || ! POSSIBLE_HEADER.contains(parts.at(0)))
> {
>
> I don’t think that this check is correct. You want to check that:
> - either the rule starts with MAP and has 3 parts
> - or it starts with EXCLUDE, and it has 2 parts
>
> It looks to me like you would be better off with a full regexp that checks
> exactly this (shouldn’t be too hard to write). Out of curiosity, what happens
> if we set a malformed host mapping rule on the context? Does it blow up? Or
> does it politely reject it? If the latter, then maybe this method is useless.
Right, I went too fast and missed that one,
Nothing bad happens if the mapping rule is a bad one, since upstream also parses & validates the rule, which I thought we could avoid for obviously bad rules (and avoid the possibly more complex upstream grammar work) but in the end it does not seem to be worth it,
I double checked that nothing bad happens,
I stripped this away, so +1,
--
https://code.launchpad.net/~abreu-alexandre/webbrowser-app/hostmapping-webview/+merge/241872
Your team Ubuntu Phablet Team is subscribed to branch lp:webbrowser-app.
More information about the Ubuntu-reviews
mailing list