Opened 6 months ago

Closed 6 months ago

Last modified 5 weeks ago

#7419 closed change (fixed)

Allow wrapping of function properties in abort-on-property-* snippets

Reported by: mjethani Assignee: hfiguiere
Priority: P2 Milestone:
Module: Core Keywords: circumvention
Cc: hfiguiere, agiammarchi, Ross, amr, BrentM, laura Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/30033574/

Description (last modified by hfiguiere)

Background

Same as #7356, but for abort-on-property-read and abort-on-property-write.

What to change

Make the same change as in #7356 but in the wrapPropertyAccess() function.

Hints for testers

It should now be possible to prevent access to properties on functions. e.g. try the filter #$#abort-on-property-read Object.keys and add <script>console.log(Object.keys({a: 1}))</script> to your HTML document; it should not print ["a"] in the console.

Change History (14)

comment:1 Changed 6 months ago by mjethani

  • Description modified (diff)

comment:2 Changed 6 months ago by hfiguiere

  • Owner set to hfiguiere

comment:3 Changed 6 months ago by hfiguiere

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 6 months ago by abpbot

A commit referencing this issue has landed:
Issue 7419 - Allow wrapping function for abort-on-property-*

comment:5 Changed 6 months ago by hfiguiere

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:6 follow-up: Changed 5 months ago by mjethani

Can we add some testing hints here?

comment:7 Changed 5 months ago by hfiguiere

  • Description modified (diff)

comment:8 Changed 5 months ago by hfiguiere

  • Description modified (diff)

comment:9 in reply to: ↑ 6 Changed 5 months ago by hfiguiere

Replying to mjethani:

Can we add some testing hints here?

done

comment:10 Changed 8 weeks ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Done. Working as described in all browsers except Edge.

The Edge issue is here.

ABP 0.9.15.2339
Microsoft Edge 44.17763.1.0 / Windows 10 1809

ABP 3.5.2.2340
Chrome 49.0.2623.75 / Windows 10 1809
Chrome 75.0.3770.142 / Windows 10 1809
Opera 36.0.2130.65 / Windows 10 1809
Opera 62.0.3331.72 / Windows 10 1809
Firefox 51.0 / Windows 10 1809
Firefox 68.0 / Windows 10 1809
Firefox Mobile 68.0 / Android 7.2.2

comment:11 Changed 8 weeks ago by agiammarchi

FWIW I can Object.defineProperty(Object, 'keys', {get() { throw new Error('nope') }}) and then Object.keys({}) to see the error in Edge 44.17763.1.0 so it's not a different descriptor implementation.

comment:12 Changed 5 weeks ago by sebastian

  • Cc BrentM added

comment:13 Changed 5 weeks ago by BrentM

  • Cc laura added

comment:14 Changed 5 weeks ago by hfiguiere

  • Sensitive unset
Note: See TracTickets for help on using tickets.