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

google.com: breakage, nuisance #23701

Closed
10 of 11 tasks
jackrjli opened this issue May 15, 2024 · 11 comments
Closed
10 of 11 tasks

google.com: breakage, nuisance #23701

jackrjli opened this issue May 15, 2024 · 11 comments

Comments

@jackrjli
Copy link

jackrjli commented May 15, 2024

Prerequisites

  • This is NOT a YouTube, Facebook, Twitch or a shortener/hosting site report. These sites MUST be reported by clicking their respective links.
  • I read and understand the policy about what is a valid filter issue.
  • I verified that this issue is not a duplicate. (Search here to find out.)
  • I did not remove any of the default filter lists, or I have verified that the issue was not caused by removing any of the default lists.
  • I did not enable additional filter lists, or I have verified that the issue still occurs without enabling additional filter lists.
  • I do not have custom filters/rules, or I have verified that the issue still occurs without custom filters/rules.
  • I am not using uBlock Origin along with other content blockers.
  • I have verified that the web browser's built-in content blocker/tracking protection, network wide/DNS blocking, or my VPN is not causing the issue.
  • I have verified that other extensions are not causing the issue.
  • If this is about a breakage or detection, I have verified that it is caused by uBlock Origin and isn't a site issue.
  • I did not answer truthfully to ALL the above checkboxes.

URL(s) where the issue occurs.

https://lens.google.com/search?p=AbrfA8rj9ThWDrIo-Ntv6o2D-ckgEuIFw1BiDTOC_1VY2PzHfHrkeUHyP44x9dzbt4aq2T975M2sLsMYU24McdJJ83eTvwsg-ZiN8VtJK8jC2KnZfkjkUsxPp_-eGiGHwq_6S-35PEPgAqSpEc0eUb2gxSkdgVlexWSJzSVAmuVL27LJPw5qDX1reKoPzUdTAa3vSNCpkClRHp5vmA%3D%3D#lns=W251bGwsbnVsbCxudWxsLG51bGwsbnVsbCxudWxsLDEsIkVrY0tKRFEwTWpOak56TmpMVGRoTXpBdE5EbGlPQzA0WXpoaUxXWXpPRFJsTVRjeFpEbGhZaElmTUY5Sk9VWTNTSHBXVjAxVlVVVjFlRFl4WHpJd1dFSTRVa2hYY3psNFp3PT0iLG51bGwsbnVsbCxudWxsLG51bGwsbnVsbCxudWxsLFtudWxsLG51bGwsW11dXQ==

This search is not NSFW, but the issue may be easier to visualize with a NSFW search since results would be blurred with SafeSearch on.

Description

When searching by image on Google (lens.google.com, or clicking on the camera icon on images.google.com, not a text search on Google Images), explicit images are blurred by default, and there is a notice on top of the search results from which you can change your SafeSearch settings ("Manage" next to "SafeSearch blurring is on"). However, when the "uBlock filters – Cookie Notices" list is enabled, this setting does not work; even if you select "Off," the results are still blurred, and the header says "SafeSearch blurring is on."

I've narrowed it down to this rule:

www.google.*##+js(trusted-set-cookie, SOCS, CAESHAgBEhJnd3NfMjAyMzA2MTItMF9SQzIaAmZpIAEaBgiAzK6kBg, 1year)

Disabling that rule with this custom rule fixes the issue:

www.google.*#@#+js(trusted-set-cookie, SOCS, CAESHAgBEhJnd3NfMjAyMzA2MTItMF9SQzIaAmZpIAEaBgiAzK6kBg, 1year)

Other extensions used

None

Screenshot(s)

Screenshot(s)

SafeSearch turned off:
safesearch-off

SafeSearch is still enabled after turning it off and clicking the back arrow (nothing is blurred in this image because none of the results are explicit, but they would be blurred if they were explicit):
safesearch-on

Configuration

Details
uBlock Origin: 1.57.2
Firefox: 125
filterset (summary):
 network: 135040
 cosmetic: 47155
 scriptlet: 20377
 html: 1801
listset (total-discarded, last-updated):
 added:
  ublock-cookies-easylist: 1145-0, never
 default:
  user-filters: 0-0, never
  ublock-filters: 38170-110, 7m
  ublock-badware: 8515-0, 7m
  ublock-privacy: 907-2, 7m
  ublock-unbreak: 2332-2, 7m
  ublock-quick-fixes: 193-5, 7m
  easylist: 87506-159, 7m
  easyprivacy: 50899-67, 7m
  urlhaus-1: 12635-3, 7m
  plowe-0: 3729-1160, 7m
filterset (user): [empty]
userSettings: [none]
hiddenSettings: [none]
supportStats:
 allReadyAfter: 3048 ms
 maxAssetCacheWait: 2230 ms
 cacheBackend: indexedDB
popupPanel:
 blocked: 8
 network:
  google.com: 8
@krystian3w
Copy link
Contributor

krystian3w commented May 15, 2024

Worse if we can't remove filter (lack of alternative in stable selector for trusted-click-element with accepted delay to hide pop-up).

You should definitely make sure that the new cookie value does not globally unlock violence and nudity.

@Yuki2718
Copy link
Contributor

Yuki2718 commented May 22, 2024

On my end the SafeSearch setting doesn't work even without uBlock filters - Annoyacnes. Now reproduced, I had to clear cookies. cc: @peace2000

Yuki2718 added a commit that referenced this issue May 22, 2024
@peace2000
Copy link
Member

Hmm.

I can only reproduce occasionally. What exact steps are needed to reproduce this each time?

@jackrjli @Yuki2718

Can you test with this filter?

www.google.*##+js(trusted-set-cookie, SOCS, CAISNQgQEitib3FfaWRlbnRpdHlmcm9udGVuZHVpc2VydmVyXzIwMjQwNTE0LjA2X3AwGgJmaSADGgYIgOu0sgY, 1year)

It enables search customization but not personalized ads.

@stephenhawk8054
Copy link
Member

I think we should not use 1year as it's difficult for most users to know how to revert the effect without clearing all cookies of that site.

@jackrjli
Copy link
Author

@peace2000 That filter works for me, didn't produce this breakage.

The direct link I provided earlier expired, so here's some more detailed steps to reproduce:

  1. Go to lens.google.com (alternatively, go to images.google.com and click on the camera icon in the search bar).
  2. Enter an image URL or upload a file. Not all images will result in the SafeSearch notice appearing; I found that https://i.redd.it/j5sajm0bka7c1.jpeg is a SFW image but still produces some blurred search results (probably due to the sites it was found on), so that's what I'm using for testing.
  3. On the results page, click "Find image source" to go to the "Exact matches" page.
  4. There should be a notice at the top of the results saying "SafeSearch blurring is on," with a "Manage" link next to it. Click "Manage," select "Off," then click the left arrow to go back.
  5. SafeSearch blurring should be turned off now, but if the issue is present then it will still be on.

@Yuki2718
Copy link
Contributor

Yeah, the new rule doesn't have the problem.

@peace2000
Copy link
Member

peace2000 commented May 23, 2024

I'm still failing to repro. But as it's reproduced by others and I also managed to reproduce it few times yesterday, I believe it's probably best to change the filter.

Though I'm bit puzzled as even if we allow search customization I'm still in doubt whether it affects Safe search functionality. Because Google describes search customization like this: "Get more relevant results and recommendations by using past Google activity from this browser." --- Doesn't mention Safe search.

Also, when I change the Safe search setting, cookie called __Secure-ENID changes it's value. SOCS doesn't change.

I'm wondering whether the issue is that the problematic filter was created last year and Google has someway changed the logic in their scripts how the cookie value is being formed and what values work properly. We need to figure this out, otherwise the new filter will break functions at some point also.

@Yuki2718 @jackrjli if you are still willing, can you try this newly created "Reject all" filter?

www.google.*##+js(trusted-set-cookie, SOCS, CAESHAgBEhJnd3NfMjAyNDA1MjAtMF9SQzEaAmZpIAEaBgiAjrqyBg)

Also as suggested by @stephenhawk8054 it might a good idea to remove the 1 year expire date and make the cookie last only for a session.

@jackrjli
Copy link
Author

@peace2000 Unfortunately that new filter breaks things for me again.

@stephenhawk8054 stephenhawk8054 changed the title lens.google.com: breakage google.com: breakage / nuisance May 24, 2024
@Yuki2718
Copy link
Contributor

Yuki2718 commented May 24, 2024

Can confirm, www.google.*##+js(trusted-set-cookie, SOCS, CAESHAgBEhJnd3NfMjAyNDA1MjAtMF9SQzEaAmZpIAEaBgiAjrqyBg) breaks SafeSearch settings again.

Also as suggested by @stephenhawk8054 it might a good idea to remove the 1 year expire date and make the cookie last only for a session.

Shouldn't we use default expiration period?

@stephenhawk8054
Copy link
Member

Shouldn't we use default expiration period?

Default is session.

@ItsProfessional ItsProfessional changed the title google.com: breakage / nuisance google.com: breakage, nuisance May 24, 2024
@peace2000
Copy link
Member

peace2000 commented May 24, 2024

For the scriptlet, session is the default expire time. Though Google sets the cookie expire time to 1 year and 1 month if generated naturally.

I wonder if there's a use case when it matters what is set for the cookie expire date.

Anyway, updated the filter 8196b3e

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

No branches or pull requests

5 participants