-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global namespace pollution; stringRefs
?
#55
Comments
stringRefs
?
Yes, you are correct, that is a global and should have been scoped to the module. A PR is welcome, thank you! |
Digging in, I see that So actually my suggestion will be to remove the stringRef extension table entries. |
Comment out decode tag 25 & 256. Making it work would further complicate read and bundled strings. Fixes: Global namespace pollution; `stringRefs` ? kriszyp#55
If you want to create examples, Python's cbor2 module supports stringrefs. The main thing to test for is the correlation between the string length and index size when determining whether to add a string to the reference table. (see also the stringref reference, which has some examples as well) |
Reading decode.js it looks like there is an undeclared variable
stringRefs
. Am I correct that the implementation of tags 25 and 256 is incomplete?Perhaps the following should be commented out to avoid treating
stringRefs
as a property of the global object.I'll submit a PR including that if you agree.
The text was updated successfully, but these errors were encountered: