fix test case for browsers that do not support __defineGetter__

This commit is contained in:
Nils Knappmeier
2019-09-27 00:09:04 +02:00
parent 2357140c68
commit 8742bde701
+3
View File
@@ -91,6 +91,9 @@ describe('security issues', function() {
describe('GH-1563', function() {
it('should not allow to access constructor after overriding via __defineGetter__', function() {
if (({}).__defineGetter__ == null || ({}).__lookupGetter__ == null) {
return; // Browser does not support this exploit anyway
}
shouldCompileTo('{{__defineGetter__ "undefined" valueOf }}' +
'{{#with __lookupGetter__ }}' +
'{{__defineGetter__ "propertyIsEnumerable" (this.bind (this.bind 1)) }}' +