Commit dcbabab
committed
fix(Web3TokenView): only enable WebView contents debugging in debug builds (#2323)
Refs #2323
Web3TokenView.init() unconditionally calls
`WebView.setWebContentsDebuggingEnabled(true)`, which leaves the in-app
WebView attachable from `chrome://inspect` on any device with USB
debugging enabled — including release builds installed on end-user
devices. Because Web3TokenView is the surface that runs TokenScript /
dapp JavaScript inside a *wallet* application, that is a CWE-489
exposure of session content for a process that signs transactions.
Gate the call behind `BuildConfig.DEBUG` so contents debugging is only
available in developer builds. This matches the practice used by
MetaMask, Trust Wallet, and other audited Android wallet apps.
This change does *not* address the larger refactor requested in #2323
(replacing the legacy provider with a MetaMask-style one); that work is
left tracked by the issue.1 parent c873a4a commit dcbabab
1 file changed
Lines changed: 5 additions & 1 deletion
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| |||
0 commit comments