Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Accept "on" value for remember me checkbox input value

Accept a value of "on" for login screen's "remember me" input value.
This is what gets sent as default by the browser when an
<input type="checkbox"> is checked.

Previously only "1" was accepted which meant checkboxes would need to
explicitly specify a value="1" in their definition.

Fixes #96
  • Loading branch information...
commit a9dd3635df1c37b6b72b928da046bd38c935e82f 1 parent 33c07c1
@nurpax nurpax authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/Snap/Snaplet/Auth/Handlers.hs
View
2  src/Snap/Snaplet/Auth/Handlers.hs
@@ -447,7 +447,7 @@ loginUser' unf pwdf remf = do
(runMaybeT $
do field <- MaybeT $ return remf
value <- MaybeT $ getParam field
- return $ value == "1")
+ return $ value == "1" || value == "on")
password <- noteT PasswordMissing $ hoistMaybe mbPassword
username <- noteT UsernameMissing $ hoistMaybe mbUsername
Please sign in to comment.
Something went wrong with that request. Please try again.