Page 1 of 1

Blocking image with # in URL

Posted: Wed Feb 15, 2017 11:25 pm
by blockyblocky
Hello,

I'm trying to add a custom rule to block images from an URL that looks like this:

||googleusercontent.com/proxy/<randomjunk>#<randomjunk><keyword><randomjunk>

I tried a few things including:

||googleusercontent/*keyword
||googleusercontent/proxy/*^*keyword

But I'm not having any luck. It seems like everything beyond the "#" is being ignored by AdBlock during the substring search. Is there an option to get access to the entire URL including the "intra-document" bookmark or link?

Thanks for any guidance.

Re: Blocking image with # in URL

Posted: Wed Feb 15, 2017 11:30 pm
by mapx
- provide an example page, explaining what do you want to block
- "allow some non intrusive advertising" is ON or OFF ?

Re: Blocking image with # in URL

Posted: Wed Feb 15, 2017 11:46 pm
by blockyblocky
The URL is incredibly long since its a google proxy image. But in particular it's a mailtrack.io signature for tracking when email is opened/loaded.

It looks like:

Code: Select all

https://ci4.googleusercontent.com/proxy/nYHC0Y6wjpp3us9QdVGymuqsjgPyobU6uTI5djEqn9PXuni4fzFP9WZdFwBs9A_EHD2Gr8g5loeOtftX92dkhl87ElPsQVjLaZ_1sQONR9_YJyBQJPnDfg89y62mSHN3NT9eGwO_nYOjAM3t=s0-d-e1-ft#<some identifying information plus the mailtrack.io url here>
It's that trailing identifying info I would like to use in my filter but everything past the "#" seems to be truncated when performing the match. For instance, going to the AdBlock tab in the chrome inspection window and using the "block this" button just adds the URL up to the pound sign to my custom filter list.

Re: Blocking image with # in URL

Posted: Wed Feb 15, 2017 11:56 pm
by smed79
Should work

Code: Select all

||googleusercontent.com/proxy/*mailtrack.io$image
Reply to the second question of mapx :
"allow some non intrusive advertising" is ON or OFF ?

Re: Blocking image with # in URL

Posted: Thu Feb 16, 2017 12:01 am
by blockyblocky
Oops, missed that second part. Yes, the "Allow some non-intrusive advertising" is currently ON. I'll try your suggestion and report back. Thanks.

Re: Blocking image with # in URL

Posted: Thu Feb 16, 2017 12:08 am
by mapx
try disabling "allow some ..." and test again using one of your first filters

Re: Blocking image with # in URL

Posted: Thu Feb 16, 2017 12:09 am
by blockyblocky
So this did not work:
||googleusercontent.com/proxy/*mailtrack.io$image

This does but has the side effect of blocking a lot of images I would rather load:

||googleusercontent.com/proxy/

I tried turning off the "Allow some non-intrusive advertising" but that does not change the behavior. From my black box observation, it seems like the data past the # is ignored. Here is the raw URL in its entirety:

Code: Select all

<img width="0" height="0" class="m_8426399240988564322mailtrack-img gmail_msg" src="https://ci4.googleusercontent.com/proxy/nYHC0Y6wjpp3us9QdVGymuqsjgPyobU6uTI5djEqn9PXuni4fzFP9WZdFwBs9A_EHD2Gr8g5loeOtftX92dkhl87ElPsQVjLaZ_1sQONR9_YJyBQJPnDfg89y62mSHN3NT9eGwO_nYOjAM3t=s0-d-e1-ft#https://mailtrack.io/trace/mail/90666113e742debc407fd183eac2573bfa8bb738.png?u=1003006">
When I click the "Block Item" in the chrome inspect/Adblock tab, adblock adds this rule:

Code: Select all

||ci4.googleusercontent.com/proxy/nYHC0Y6wjpp3us9QdVGymuqsjgPyobU6uTI5djEqn9PXuni4fzFP9WZdFwBs9A_EHD2Gr8g5loeOtftX92dkhl87ElPsQVjLaZ_1sQONR9_YJyBQJPnDfg89y62mSHN3NT9eGwO_nYOjAM3t=s0-d-e1-ft

Re: Blocking image with # in URL

Posted: Thu Feb 16, 2017 12:24 am
by mapx
yeah, it seems to be a bug. In ABP for firefox is working fine, in ABP for chrome it does not.

Re: Blocking image with # in URL

Posted: Thu Feb 16, 2017 12:47 am
by mapx

Re: Blocking image with # in URL

Posted: Thu Feb 16, 2017 1:04 am
by blockyblocky
I'll go shotgun approach until that gets fixed. Thanks for your help.

Re: Blocking image with # in URL

Posted: Sun Aug 13, 2017 9:50 pm
by lewisje
Technically, the bit after the # (the fragment identifier) is not needed to determine what resource to request, so it is not sent to the server with the rest of the URL; then in some Web apps, JS in the response looks at the fragment identifier to figure out what resource(s) to request, and then continues to request content.

You could record the Web traffic to figure out where the image ultimately comes from, but for all I know, it might be a different URL each time.