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:
Danielle McLean 2017-10-05 01:22:34 +11:00
parent bac575b140
commit 69e3d7f267
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
3 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ User
PgpKey
userId UserId
fingerprint Text maxlen=40
hash Text maxlen=64
hash Text maxlen=22
UniqueFingerprint fingerprint
Site

View file

@ -27,7 +27,7 @@ prettyPgp = T.unwords . T.chunksOf 4 . pgpKeyFingerprint
routeFromPgp :: PgpKey -> Route App
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 userId user) = do