ajv-validator / ajv-validator/ajv-keywords
Keyword suggestion: prevent shadowing properties in Object.prototype
- 主要语言
- TypeScript
- 星标
- 257
- 派生
- 51
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi, a variant of "propertyNames" keyword could strip property names in Object.prototype. It could be a fast version with a `key in Object.prototype` check, and I'd like to use it whenever I allow additionalProperties. The reason I'm suggesting this is that currently quite often people just use `JSON.parse` and don't consider that if they get a malicious object such as `{"toString":null}` it will quite easily break downstream as some logging, string concatenation or similar will call `toString` on it. Similar with other properties in `Object.prototype`, and it would be nice to avoid the function call in "propertyNames" with this keyword variant.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。