Skip to content

Commit 5309df8

Browse files
Check for API predence in Windows permissions (#1773)
* Update windows-permission-usage.js * Update windows-permission-usage.js * Update windows-permission-usage.js
1 parent 43f88f9 commit 5309df8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

injected/src/features/windows-permission-usage.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@ export default class WindowsPermissionUsage extends ContentFeature {
391391
];
392392
for (const { name, prototype, method, isPromise } of permissionsToDisable) {
393393
try {
394-
const proxy = new DDGProxy(this, prototype(), method, {
394+
const protoObj = prototype();
395+
if (!protoObj || !(method in protoObj)) continue;
396+
const proxy = new DDGProxy(this, protoObj, method, {
395397
apply() {
396398
if (isPromise) {
397399
return Promise.reject(new DOMException('Permission denied'));

0 commit comments

Comments
 (0)