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

Don't silently fail with unsafe strings #35

Open
hiemanshu opened this issue Nov 3, 2022 · 0 comments
Open

Don't silently fail with unsafe strings #35

hiemanshu opened this issue Nov 3, 2022 · 0 comments

Comments

@hiemanshu
Copy link
Contributor

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

If a prefix or key includes "unsafe" characters like : or | the initialization / memoize-ation can silently fail. Ideally memoredis throws an error about unsafe strings rather than silently failing and not returning anything.

https://github.com/politics-rewired/memoredis/blob/main/src/lib/memoizer.ts#L78-L80

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
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

No branches or pull requests

1 participant