If by mistake someone calls the customAlphabet method with the size parameter as a string, it causes a "JavaScript heap out of memory" exception
"FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory"
Seems that the 3.1.19 version introduces some changes in the customRandom exit clause that results in an infinite while loop when size is a string parameter.
I noticed the error when updating to 3.3.4 due to my code path assigning the parameter from an ENV variable.
Should it add some validation to avoid unexpected errors?
If by mistake someone calls the
customAlphabet
method with the size parameter as a string, it causes a "JavaScript heap out of memory" exceptionSeems that the 3.1.19 version introduces some changes in the
customRandom
exit clause that results in an infinite while loop whensize
is a string parameter.I noticed the error when updating to 3.3.4 due to my code path assigning the parameter from an ENV variable.
Should it add some validation to avoid unexpected errors?