Thrawn wrote:I think that you misunderstand ABE syntax (as many people do).
ABE is about controlling requests. 'Site' means the destination of a request, and 'from' refers to the origin of a request (usually the site that you're visiting, ie the one in the address bar).
Yes, I realize that. It was the first thing I figured out from the docs. So the rule "Site X Do Y" means that if something (be it some site or the user typing in the address bar directly) requests something from site X, the browser should do Y. I have tested it with "Site
www.zr.ru Deny" - if I type "
www.zr.ru" in the address bar, a message pops up saying "Request GET filtered by ABE", and the browser refuses to open the page at all. That's exactly because I block the
request for www.zr.ru with "Site
www.zr.ru", and I don't specify "from" so it gets blocked from everywhere, including the address bar.
Now, if I say "Sandbox" instead of "Deny", it is supposed to mean "allow request itself, but block active content in the received data". And that's exactly how it works except for the first time load. To quote the rules spec,
Sandbox – sends the requests as it is, but disables JavaScript and other active content (e.g.
plugin embeddings) in the landing page
That sounds like exactly what I want. And I don't care where the request is coming from. If the user types "
www.zr.ru", it should load the page, but block scripts and other active stuff. If some other site is stupid enough to request something from
www.zr.ru for whatever reason, the request should come through, but the received data should be completely static.
Thrawn wrote:
Code: Select all
Site ALL
Accept from www.zr.ru/forum/
Sandbox from .zr.ru
actually means "Allow
www.zr.ru/forum to request whatever it wants, but prevent any other part of zr.ru and its subdomains from requesting active content".
I don't want to prevent zr.ru from requesting active content. I want to block all active content for it, just like NoScript blocks it on all sites that aren't whitelisted. If I do it, it doesn't make any sense to prevent it from requesting anything, since it wouldn't be able to do it anyway.
Besides, I thought that it's Deny INCLUSION that prevents a site from loading active content, not Sandbox.
Thrawn wrote:
Whereas
actually means "Prevent any site from loading active content hosted on
www.zr.ru" (and it doesn't affect any other subdomains of zr.ru).
Not exactly "any site", but "anything", even the user, right? At least it works with "Deny", so I don't see why it shouldn't work with "Sandbox". Especially since it works, just not on the first time.
Thrawn wrote:
Your suggested rules tell ABE to sandbox requests
aimed at www.zr.ru, but I think that what you really want is to sandbox requests
coming from zr.ru. I'm not sure whether that affects inline scripts...Giorgio would know best.
No, I want to make sure that the entire page is sandboxed. I don't mind the page requesting anything since it would be only inactive content like images.
Thrawn wrote:
Not entirely sure about the 'not working on first load' thing, but let's first try the right rule(s). If it really is a bug, Giorgio would be the one who could identify and fix it.
As I've already said, that "right" rules don't seem to work at all, whether on first time load on on subsequent ones. Well, maybe they prevent
www.zr.ru from loading external resources (not checked that), but since most evil things are done by inline scripts, that doesn't help much.
I have replaced
www.zr.ru with .zr.ru in my config because I want to sandbox requests for other subdomains too (not sure if there are any, though), but that didn't change anything. It still blocks scripts on the second and subsequent loads, but fails to do so for the first request.