Skip to content

Fix 'isMatchingSuspended' in 'trusted-json-set' and 'trusted-replace-argument' scriptlets #565

@AdamWr

Description

@AdamWr

Currently there is Maximum call stack size exceeded error when trusted-json-set or trusted-replace-argument is called with property used inside scriptlet.

Steps to reproduce:

  1. Add to user rules:
example.org#%#//scriptlet('trusted-json-set', 'Object.prototype.hasOwnProperty', '$.*.foo.bar', '$remove$', '', 'this')

or

example.org#%#//scriptlet('trusted-replace-argument', 'String.prototype.replace', '0', '"Replacement"', 'Foo bar')
  1. Navigate to - https://example.org/

Website freezes.

This line:

isMatchingSuspended = false;

Probably should be removed, similar for trusted-replace-argument.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions