Skip to content

Hooking function RegExp.prototype.exec breaks page loads #48

Description

@nickcopi

Please complete the following information:

  • OS: Windows 10
  • Browser and version: Google Chrome 138.0.7204.184
  • Extension version: 1.0.10

Describe the bug
DLPP breaks when hooking the RegExp.prototype.exec function. At one point, it would throw a stack recursion exception and the page would load, but now trying to reproduce this later, I just am seeing pages hang instead. It appeared to be calling this under the hood as part of some internal logic and getting fooled by its hooked version. I'm not sure if this is a known or intended limitation.

To Reproduce

  1. Set the following configuration for DLPP
{
  "config": {},
  "hooks": {
    "ReDoS": {
      "function": [
        "RegExp.prototype.exec"
      ]
    }
  }
}
  1. Enable DLPP for a domain
  2. Load a page that has JavaScript on it
  3. Observe that the page hangs and no longer loads

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions