You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zlib.constant.Z_RLE is 3 but code will happily accept "3" and work just fine.
Either we should add a test to confirm that strings continue to work, or else strictly enforce that only exactly the constants provided by zlib.constants are acceptable.
The text was updated successfully, but these errors were encountered:
Currently, strategy constants are integers but Node.js will accept
string versions of those integers. Users should be using the provided
zlib constants and not hardcoding numbers, strings, or anything else. As
such, Node.js should be strict about accepting only exactly those values
that are in the provided zlib constants.
Fixes: nodejs#10932
Trott
added a commit
to Trott/io.js
that referenced
this issue
Jan 21, 2017
The Zlib constructor accepts strategy constants that are integers.
Current code will also work with string versions of those integers. Add
test for this situation.
Fixes: nodejs#10932
zlib.constant.Z_RLE
is3
but code will happily accept"3"
and work just fine.Either we should add a test to confirm that strings continue to work, or else strictly enforce that only exactly the constants provided by
zlib.constants
are acceptable.The text was updated successfully, but these errors were encountered: