Created
July 13, 2015 05:46
-
-
Save christian-marie/f5f35e902f85e17063e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Network/OAuth2/Server/App.hs b/lib/Network/OAuth2/Server/App.hs | |
index f93177f9b051..c60cca0573ff 100644 | |
--- a/lib/Network/OAuth2/Server/App.hs | |
+++ b/lib/Network/OAuth2/Server/App.hs | |
@@ -58,6 +58,7 @@ import Control.Lens | |
import Control.Monad | |
import Control.Monad.IO.Class (MonadIO (liftIO)) | |
import Control.Monad.Reader.Class (ask) | |
+import Data.ByteString.Char8 (readInt) | |
import Data.Either (lefts, rights) | |
import Data.Maybe | |
import Data.Monoid | |
@@ -113,7 +114,7 @@ getTokensR = do | |
OAuth2Server{serverTokenStore=ref,serverOptions=serverOpts} <- ask | |
(u, s) <- checkShibHeaders | |
maybe_p <- lookupGetParam "page" | |
- let p = preview page . read . T.unpack =<< maybe_p | |
+ let p = preview page =<< fmap fst . readInt . T.encodeUtf8 =<< maybe_p | |
serverListTokens ref (optUIPageSize serverOpts) u s p | |
data TokenRequest = DeleteRequest TokenID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment