Skip to content
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

chore: remove shortid, add nanoid #212

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

nkgardose
Copy link

Fixes #211

@nkgardose
Copy link
Author

nkgardose commented Jan 2, 2025

@TimboKZ Hey, shortid is deprecated and is dependent on an older version of nanoid which causes a dependabot alert due to security issues. Just FYI

Warning

When nanoid is called with a fractional value, there were a number of undesirable effects:

  1. in browser and non-secure, the code infinite loops on while (size--)
  2. in node, the value of poolOffset becomes fractional, causing calls to nanoid to return zeroes until the pool is next filled
  3. if the first call in node is a fractional argument, the initial buffer allocation fails with an error

Version 3.3.8 and 5.0.9 are fixed.

Let me know if these changes are good for you. Feel free to update, approve, or merge as you wish. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dependencies deprecated
1 participant