Permalink
Browse files

Avoid setting empty cookie fields.

  • Loading branch information...
1 parent d6edecb commit 081377567b05fd74f1368b9ae5f3fd7785218985 @jgm committed Feb 1, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 Gitit.hs
View
@@ -583,7 +583,7 @@ loginUser page params = do
then do
key <- newSession (SessionData uname)
addCookie sessionTime (mkCookie "sid" (show key))
- addCookie 0 (mkCookie "destination" "") -- remove unneeded destination cookie
+ addCookie 0 (mkCookie "destination" "/") -- remove unneeded destination cookie
seeOther destination $ toResponse $ p << ("Welcome, " ++ uname)
else
loginUserForm' page (params { pMessages = "Authentication failed." : pMessages params })
@@ -595,7 +595,7 @@ logoutUser _ params = do
case key of
Just k -> do
delSession k
- addCookie 0 (mkCookie "sid" "") -- make cookie expire immediately, effectively deleting it
+ addCookie 0 (mkCookie "sid" "-1") -- make cookie expire immediately, effectively deleting it
Nothing -> return ()
seeOther destination $ toResponse "You have been logged out."

0 comments on commit 0813775

Please sign in to comment.