Use a much shorter scheme for constructing PGP key URLs - hashes are now MD5 in base64, which isn't secure but doesn't need to be since it's just for cachebusting
This commit is contained in:
parent
bac575b140
commit
69e3d7f267
3 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ User
|
||||||
PgpKey
|
PgpKey
|
||||||
userId UserId
|
userId UserId
|
||||||
fingerprint Text maxlen=40
|
fingerprint Text maxlen=40
|
||||||
hash Text maxlen=64
|
hash Text maxlen=22
|
||||||
UniqueFingerprint fingerprint
|
UniqueFingerprint fingerprint
|
||||||
|
|
||||||
Site
|
Site
|
||||||
|
|
|
@ -27,7 +27,7 @@ prettyPgp = T.unwords . T.chunksOf 4 . pgpKeyFingerprint
|
||||||
|
|
||||||
routeFromPgp :: PgpKey -> Route App
|
routeFromPgp :: PgpKey -> Route App
|
||||||
routeFromPgp PgpKey { pgpKeyFingerprint = f, pgpKeyHash = h } =
|
routeFromPgp PgpKey { pgpKeyFingerprint = f, pgpKeyHash = h } =
|
||||||
StaticR $ StaticRoute ["pgp", f, h, T.takeEnd 8 f ++ ".asc"] []
|
StaticR $ StaticRoute ["pgp", h, T.takeEnd 8 f ++ ".asc"] []
|
||||||
|
|
||||||
hcard :: Entity User -> Widget
|
hcard :: Entity User -> Widget
|
||||||
hcard (Entity userId user) = do
|
hcard (Entity userId user) = do
|
||||||
|
|
Loading…
Reference in a new issue