brave-ios icon indicating copy to clipboard operation
brave-ios copied to clipboard

Match Safari in anonymizing js method values

Open iccub opened this issue 2 years ago • 2 comments

More details https://bravesoftware.slack.com/archives/C023VS4HJ6Q/p1655233690880109?thread_ts=1655232077.572789&cid=C023VS4HJ6Q

iccub avatar Jun 14 '22 19:06 iccub

I think we should implement a generic utils method to lift this issue. Hereafter an example implementation:

const generatePPToString = (body) => {
    const toString = () => {
      return body
    }

    const recursiveToString = () => {
      return Object.toString.toString()
    }

    recursiveToString.toString = recursiveToString
    toString.toString = recursiveToString

    return toString
  }

thypon avatar Jun 15 '22 20:06 thypon

Cc @cuba regarding https://github.com/brave/brave-ios/pull/5444

thypon avatar Jul 07 '22 16:07 thypon

This was done as part of the Javascript refactor and also in SolanaWeb3.js

Brandon-T avatar Jan 13 '23 18:01 Brandon-T