mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Fix secret hash size to match JWT tokens
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
(when-not secret
|
||||
(ex/raise :code ::missing-secret-key
|
||||
:message "Missing `:secret` key in config."))
|
||||
(hash/blake2b-512 secret)))
|
||||
(hash/blake2b-256 secret)))
|
||||
|
||||
(defstate secret
|
||||
:start (initialize-secret config))
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
(defn digest
|
||||
[^bytes data]
|
||||
(-> (hash/blake2b-512 data)
|
||||
(-> (hash/blake2b-256 data)
|
||||
(b64/encode true)
|
||||
(codecs/bytes->str)))
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
using urlsafe variant of base64."
|
||||
[]
|
||||
(-> (nonce/random-bytes 1024)
|
||||
(hash/blake2b-512)
|
||||
(hash/blake2b-256)
|
||||
(b64/encode true)
|
||||
(codecs/bytes->str)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user