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

Websites using SXG have no cosmetic filtering when opening from Google search #1812

Closed
zloyden opened this issue Oct 10, 2023 · 9 comments
Closed

Comments

@zloyden
Copy link

zloyden commented Oct 10, 2023

Something is wrong when opening some sites via google search in the Yandex browser. The browser uses default certificate, after refreshing the page it switches to AdGuard. Does not happen when you open the site directly. I've noticed it in AdGuard for Windows / Android.
I used twinfinite.net as en example.
STR:

  1. Type twinfinite.net in google search via Yandex browser

  2. Click on the twinfinite.net URL there

  3. You'll be redirected to this site

  4. Inspect the certificate. This is what I get

    Screenshot:

    image

  5. Refresh the page

  6. The certificate will change to AdGuard.

So, the browser should use AdGuard certificate when you open the site via google search.

@zloyden zloyden added the bug label Oct 10, 2023
@ameshkov
Copy link
Member

Tbh it sounds like some kind of a bug of YaBro.

The browser uses default certificate, after refreshing the page it switches to AdGuard

What about the filtering? Is everything filtered okay?

@zloyden
Copy link
Author

zloyden commented Oct 10, 2023

What about the filtering? Is everything filtered okay?

Yes, after refreshing the page the filtering works fine.

@ameshkov
Copy link
Member

And what about before refreshing?

@sfionov
Copy link
Member

sfionov commented Oct 10, 2023

@ameshkov No legacy Assistant. Seems that they started to use SXGs:

<a jsname="UWckNb" href="https://twinfinite-net.webpkgcache.com/doc/-/s/twinfinite.net/" jscontroller="M9mgyc" jsaction="rcuQ6b:npT2md" data-sxg-url="https://twinfinite-net.webpkgcache.com/doc/-/s/twinfinite.net/" data-ved="2ahUKEwi0pMnlw-uBAxXoSfEDHQg6BPIQFnoECBIQAQ" ping="/url?sa=t&amp;source=web&amp;rct=j&amp;opi=89978449&amp;url=https://twinfinite.net/&amp;ved=2ahUKEwi0pMnlw-uBAxXoSfEDHQg6BPIQFnoECBIQAQ" target="_blank" rel="noopener"><br><h3 class="LC20lb MBeuO DKV0Md">Twinfinite - Video Game news, reviews, opinions, guides and ...</h3><div class="notranslate TbwUpd NJjxre iUh30 ojE3Fb"><span class="H9lube"><div class="eqA2re NjwKYd Vwoesf" aria-hidden="true"><img class="XNo5Ab" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAE3UlEQVR4Ae2WA3BkWRSG71MwVrDeHVuxx7Zt27Ztx+rYGtsT25qNbTTunlTd3urpWFvar+prPJzzP5166H+6d+/e66+/+vSpV/hQVFTsjhDqDLKgNDTY4fffe3cHejekZtV2CDcCPhAZGfl25Mixo6GZHCiGNTIympCZmR0sFApFuBEg3ASSk78nKSgo6JIzQZ05c0a7vLyiEDcBhJvI+YuXHkLzLqBseHikLW4iyNzcwr8hGhoah1dUVAoxgcezewfN/wQ7paamBWNCQkJyxb37hjFmZuYBDamLgMESDgGHgapiyf8h/fsPXIIlsLbmfYHlvcGuKSkpoZgQExNbhBC9CZYPlag5XKKeingdEdFgO9RbpS+z9/4K9prPJe7he2vQlrn7ypQ+bHoIDRulf/To0Q0NCVBaWirgOLnlsFwRjV6oRZ+y3QV1HnCPPthUyVzzvs1sPL8Gybav2rctYvY+WsVaB3/knuVUcq8KcU2yz/ME2y/d/daQAIV8IVY6+OAzZx+dwL0swLXWdEvOZQ8Y3kRkI9IoHzMnbVOo0Qs9UW+1O6iv5jVaY+JDatF+13uPTELrCpBRLsC7o0pwx9ekXgNF/za3jy6nNCZ7IsQshKI9yR3eCewK9goODvlQQ4B+SFa2544PcQld30g2bkIAaoCeBxTUAuVBabqmZ2REYwlMTc2D6EX7TnGOsdFSRZt4Bk7ZBqK+alOhmTLYjkw6GWLPoqKiQgxUnWqrlDI85FW6QKpYcwIQ4Wbj7CLjWeMvz9kH7+yZe6/MuAfveNyjj68n+xeJ+n4sxDL1FPzlXQHW+ZAtZE47ZDEneHHs3gdhzCm7GLj7/2atQoq5F/m1B2iqgz4W4JtJZTi2mI9FIoxLSkqFMjLyFxFC+uTZ10CIHYUQM5/urXaePe8c2SIBWHP/EmrUoo++vgG5WAodHYND0LgNSBFpkAO70sNH7WhWgN/gNE+455KBZNqdgIKjExISo7AU27btuEeeIjEUKM8u3DuBc0lIalKAbvConYgpwQWVAmxhYeVLxqwCGUQ/cP36DU9Y1x9UAH9mxy8byT14b8s+y/1h4CFm561nrPt3srBmNb4U4vtJpTgfGtc3CcWYm1vGsLzQTNYpNoXzTCnkXhaKxPXgRhQxt17kUJNWP0VAb9ReYTU9eyuPPmDoz1xwiWfOOyfSB4zCmeVH3lJ9tFxycnIrMaGhAV68eJ3NLDn4mT1mGQY1E5gTVjH0psu+1JS1HqjbnxfJwBsgvjZy5PkfSIaRLqgO9lVRUZksAhobID4+oRCarCJPgTapOxj8g7zWyZDe1aAkNTQ0XIIJtQRQyMzMTMBSlJWVC2Rk5BaTO58iNhpq9er1E4qKi0uxFA4Ojr6wvg+olJ2dnYilCAsLz5WXbzeXBGgWXQ8fPn5RIBCIsAQeHl4hsG5QTQEyMrIqBgwYchvW/QVSqJlQYHdrnq1LQwJUVFSIZs2a50LefFjUQjAcxw3/8tU3sL4Ax0+c/gJ9x8NyWdTCyP7Ro8fEpKTktNoCODm5JEDWZbCsPWol2k2ePG1dYVFRqXQAeGHJbd++8374rwhSqBVROHDgyAUI4EsGiVJERFTYoEFDr8PvHq3dHJEGf0yYMGlh1YwHO0ycOGUOCcOi/wgalAdZ8luuqc3/Ae+Ez8unYDhGAAAAAElFTkSuQmCC" style="height:18px;width:18px" alt="" data-atf="1" data-frt="0"></div></span><div><span class="VuuXrf">Twinfinite</span><div class="byrV5b"><cite class="tjvcx GvPZzd cHaqb" role="text">https://twinfinite.net</cite></div></div></div></a>

@ameshkov
Copy link
Member

Specific to AMP versions?

@ameshkov
Copy link
Member

Okay I see: https://developers.google.com/search/docs/appearance/signed-exchange

Signed exchanges (SXG) allow Google Search to prefetch your content while preserving the user’s privacy. In practice, this means that both AMP and non-AMP results shown on Google Search may prefetch a few key resources (such as HTML, JavaScript, CSS, images, or fonts) in a privacy-preserving manner, if the associated website supports SXG.

@ameshkov ameshkov changed the title Improve the use of the AdGuard certificate when opening a website via google search in the Yandex browser Websites using SXG have no cosmetic filtering when opening from Google search Oct 10, 2023
@ameshkov
Copy link
Member

@zloyden could you please try as a temporary solution remove data-sxg-url attribute from all links on Google search results page? Does it help?

Note, that if you do that, it should only be done for CoreLibs-based versions, not for the browser extensions.

@ameshkov
Copy link
Member

Okay nvm, I did a quick check, this is not enough, Google still replaces href right when the user clicks the link. It can be temporary solved by a userscript while CoreLibs team come up with a better solution.

@ameshkov
Copy link
Member

@sfionov the solution would be to remove application/signed-exchange from the request's Accept header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants