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

Allow slash as character in keys #568

Open
1 task
pwFoo opened this issue Jan 12, 2025 · 0 comments
Open
1 task

Allow slash as character in keys #568

pwFoo opened this issue Jan 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@pwFoo
Copy link

pwFoo commented Jan 12, 2025

Describe the feature

My keys contain a SubtleCrypto.exportKey() strings which can contain slashes as character. So / should not handled as delimiter like : to work as expected.

Tested with memory driver.

db = createStorage()
db.set("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEzM+xsV8fca/Gk/CgU4F2eyrblaqEcLdyjO4+X+ISs5sLwJHcJAGnG2axIyhYEVkjMUoL8+xWzDq+Wtd4wXrIlQ==:key1", "val1")

// correct matching...
await db.get("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEzM+xsV8fca/Gk/CgU4F2eyrblaqEcLdyjO4+X+ISs5sLwJHcJAGnG2axIyhYEVkjMUoL8+xWzDq+Wtd4wXrIlQ==:key1")
// output: "val1"

// wrong machting key...
await db.get("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEzM+xsV8fca:Gk:CgU4F2eyrblaqEcLdyjO4+X+ISs5sLwJHcJAGnG2axIyhYEVkjMUoL8+xWzDq+Wtd4wXrIlQ==:key1")
// output: "val1" but shouldn't exist!

Any way to configure delimiter or exclude "/"?

Additional information

  • Would you be willing to help implement this feature?
@pwFoo pwFoo added the enhancement New feature or request label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant