mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1065185 - Turn off indexed/.length access on COW arrays. r=bz
This commit is contained in:
parent
856dd13c4a
commit
37fe5caf3b
@ -248,14 +248,6 @@ ExposedPropertiesOnly::check(JSContext *cx, HandleObject wrapper, HandleId id, W
|
||||
if (!JS_HasPropertyById(cx, wrappedObject, exposedPropsId, &found))
|
||||
return false;
|
||||
|
||||
// Always permit access to "length" and indexed properties of arrays.
|
||||
if ((JS_IsArrayObject(cx, wrappedObject) ||
|
||||
JS_IsTypedArrayObject(wrappedObject)) &&
|
||||
((JSID_IS_INT(id) && JSID_TO_INT(id) >= 0) ||
|
||||
(JSID_IS_STRING(id) && JS_FlatStringEqualsAscii(JSID_TO_FLAT_STRING(id), "length")))) {
|
||||
return true; // Allow
|
||||
}
|
||||
|
||||
// If no __exposedProps__ existed, deny access.
|
||||
if (!found) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user