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

uBO has problems with css styles #3169

Closed
TheFinalCut83 opened this issue Oct 24, 2017 · 4 comments
Closed

uBO has problems with css styles #3169

TheFinalCut83 opened this issue Oct 24, 2017 · 4 comments

Comments

@TheFinalCut83
Copy link

Describe the issue

It seems like uBO cannot properly handle complex styles with additional parameters. On kinopoisk.ru branding appears at the left and right sides, most likely that rule
kinopoisk.ru#?#body:style(background: #d5d5d5 url(http://st.kp.yandex.net/images/noBrandBg.jpg) 50% 0 no-repeat !important; color: #333 !important)
from updated RU AdList+css fixes is not processed by uBO correctly and thus does nothing, when with CSS Fixes via Greasemonkey/Violentmonkey/Stylish it works well (https://i.imgur.com/UdEWrgy.jpg).

One or more specific URLs where the issue occurs

https://www.kinopoisk.ru

Screenshot in which the issue can be seen

thwvs39

Steps for anyone to reproduce the issue

  1. Go to kinopoisk.ru with settings as said in "Your settings"
  2. See branding at left and right
  3. Install an addon that support userscripts or userstyles (Greasemonkey/Violentmonkey/Stylish) and RU AdList CSS Fixes and you will not see any branding.

Your settings

  • OS/version: Windows 7 x64
  • Browser/version: Firefox 56.0.1, Cyberfox 52.4 | Cent Browser 2.9.4.39
  • uBlock Origin version: 1.14.16, 1.14.17b4 | 1.14.12
Your filter lists

uBlock filters
uBlock filters – Badware risks‎
uBlock filters – Privacy‎
uBlock filters – Resource abuse
uBlock filters – Unbreak‎
Adblock Warning Removal List
EasyList
EasyPrivacy‎
Peter Lowe’s Ad and tracking server list
RUS: Adguard Russian Filter
RUS: RU AdList

@gorhill
Copy link
Owner

gorhill commented Oct 24, 2017

inopoisk.ru#?#body:style(background: #d5d5d5 url(http://st.kp.yandex.net/images/noBrandBg.jpg) 50% 0 no-repeat !important; color: #333 !important)

That kind of filter is forbidden in uBO, by design: any cosmetic :style filter which uses url will be rejected, as this could be used maliciously by a filter list maintainer to force your browser to connect to undesirable web sites.

@gorhill gorhill closed this as completed Oct 24, 2017
@lainverse
Copy link

Hi gorhill,

Could you please add support for url(data:image/png;base64,...) and url(data:image/jpeg;base64,...)? As I understand it's pretty much impossible to misuse these. Am I wrong?

@gorhill
Copy link
Owner

gorhill commented Oct 25, 2017

What is a real case requiring that the background be absolutely an image?

Can't background-image: none be used?

@lainverse
Copy link

lainverse commented Oct 25, 2017

Rare cases when clickable site logo were rendered on the same image with branding (and clickable block were empty). I've encountered this twice. Not really important, but would be nice to have.

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

3 participants