-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Prevent keys from starting with slashes (#172)
* [FIX] Prevent keys from starting with slashes If a key starts with a slash, then it becomes undeletable and prevents database purges from working properly as well. This prevents that from occuring by stripping slashes from the left of the key name. * Double newlines for flake8 * flake8 wanted another newline here * Force `set_bulk_raw` to handle keys with slashes as well * Add tests for keys starting with a slash * Fix a typo I made twice * flake8 * `del self.db[k]` not `self.db.delete(k)` in non-Async * One space for flake8 * These were also wrong * These shouldn't be using `get` * Match format of some of the other tests in TestDatabase * Perhaps the key is corrupted? * Have to `get_raw` for `_raw` calls. * Reassociate _dumps with def dumps * Only call keyStrip at the root of the .set function hierarchy * Clarify that keyStrip is an internal method --------- Co-authored-by: Devon Stewart <[email protected]>
- Loading branch information
1 parent
5c0ab7a
commit 4a5a7ac
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters