diff options
Diffstat (limited to 'src/Auth.hs')
-rw-r--r-- | src/Auth.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Auth.hs b/src/Auth.hs index 397dd75..df97e8b 100644 --- a/src/Auth.hs +++ b/src/Auth.hs @@ -14,7 +14,7 @@ import Yesod ensureAuth :: MonadHandler m => m () ensureAuth = lookupBasicAuth >>= \case Nothing -> notAuthenticated - Just (user, pw) -> unless (hashSha512 pw == hardcodedPw && user == "bleb") notAuthenticated + Just (user, pw) -> unless (hashSha512 pw == hardcodedPw && user == "bleb") $ permissionDenied "Wrong username/password" where hashSha512 pw = convertToBase Base64 $ (hash $ encodeUtf8 pw :: Digest SHA512) hardcodedPw :: ByteString hardcodedPw = "l2gTDo5UCimSIQcdK4IrAvJtCIE7KPB7IyS5N7EN4ic78/1mI+8pikPTQTn06+W1XTOk39TgqGEX5KfpAQVm4w==" |