feat: note search and shareable links #1
+1
-1
@@ -35,4 +35,4 @@ def make_share_token(note_id: int) -> str:
|
|||||||
|
|
||||||
def check_share_token(supplied: str, expected: str) -> bool:
|
def check_share_token(supplied: str, expected: str) -> bool:
|
||||||
"""Validate a share token supplied in a URL."""
|
"""Validate a share token supplied in a URL."""
|
||||||
return supplied == expected
|
return hmac.compare_digest(supplied, expected)
|
||||||
|
|||||||
Reference in New Issue
Block a user