libreoffice-online/loleaflet/js
Ayhan Yalçınsoy c1df79e229 loleaflet: Towards eslint 6.0.0 #396 - no-prototype-builtins
The "extends": "eslint:recommended" property in a configuration file enables this rule.

In ECMAScript 5.1, Object.create was added, which enables the creation of objects
with a specified [[Prototype]]. Object.create(null) is a common pattern used to create
objects that will be used as a Map. This can lead to errors when it is assumed that
objects will have properties from Object.prototype. This rule prevents calling some
Object.prototype methods directly from an object.

Additionally, objects can have properties that shadow the builtins on Object.prototype,
potentially causing unintended behavior or denial-of-service security vulnerabilities.
For example, it would be unsafe for a webserver to parse JSON input from a client and
call hasOwnProperty directly on the resulting object, because a malicious client could
send a JSON value like {"hasOwnProperty": 1} and cause the server to crash.

To avoid subtle bugs like this, it's better to always call these methods from Object.prototype.
For example, foo.hasOwnProperty("bar") should be replaced with Object.prototype.hasOwnProperty.call(foo, "bar").

See: https://eslint.org/docs/rules/no-prototype-builtins

Change-Id: Id7723f0f0ed81e074f56955f80eda3d70241294e
Signed-off-by: Ayhan Yalçınsoy <ayhanyalcinsoy@pisilinux.org>
2020-11-01 00:47:10 +03:00
..
Autolinker.js
global.js loleaflet: Towards eslint 6.0.0 #396 - no-prototype-builtins 2020-11-01 00:47:10 +03:00
jquery.mCustomScrollbar.js
json2.js
l10n.js
sanitize-url.js
select2.js
vex.combined.js
viamapi-client.js
w2ui-1.5.rc1.js