decimal.js icon indicating copy to clipboard operation
decimal.js copied to clipboard

Assigning to constructor at runtime

Open golobitch opened this issue 2 years ago • 0 comments

Decimal.js is not working with Secure ECMAScript (SES) due to assigning value to constructor at runtime. Constructor must be read-only. This by definition from SES is security concern.

This issue occurs at least here: https://github.com/MikeMcl/decimal.js/blob/7f01abd83d5632005d5f97ddbea41e069ee69a74/decimal.js#L4894

I haven't had time to check for other issues.

I got following error while trying to run this under SES: (TypeError#1) TypeError#1: Cannot assign to read only property 'constructor' of object '[object Object]'

golobitch avatar Sep 17 '23 07:09 golobitch