-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
The partial function decodeUtf8 is applied here to user input and will throw impurely if the cookie value is not UTF-8.
| let maybeInputId = mcookieVal >>= fromPathPiece . TE.decodeUtf8 |
Since the output here is going into a Maybe context anyway, I think an easy improvement here could be
let maybeInputId =
mcookieVal
>>= (either (const Nothing) Just . TE.decodeUtf8')
>>= fromPathPiecencaq