diff --git a/yesod-core/Yesod/Internal/Request.hs b/yesod-core/Yesod/Internal/Request.hs index 6470e3f9..d447b5ba 100644 --- a/yesod-core/Yesod/Internal/Request.hs +++ b/yesod-core/Yesod/Internal/Request.hs @@ -81,10 +81,7 @@ parseWaiRequest' env session' key' gen = Request gets'' cookies' env langs''' no randomString :: RandomGen g => Int -> g -> String randomString len = take len . map toChar . randomRs (0, 61) where - toChar i - | i < 26 = toEnum $ i + fromEnum 'A' - | i < 52 = toEnum $ i + fromEnum 'a' - 26 - | otherwise = toEnum $ i + fromEnum '0' - 52 + toChar i = (['A'..'Z'] ++ ['a'..'z'] ++ ['0'..'9']) !! i -- | A tuple containing both the POST parameters and submitted files. type RequestBodyContents =