-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure XSRF prefix for json responses #121
Comments
@alexanderkjeldaas What do you suggest to do here? Do you want a way to register a postprocessor for tranformJSON :: (ByteString -> ByteString) -> ActionM () that can then be used like so: main = scotty 3000 $ do
tranformJSON (")]}',\n" <>)
get "/" $ do
json [23 :: Int, 42] |
Yes, something like that. With a focus on ensuring that it is unlikely that an uprotected json response will be sent in a large application. |
What do you have in mind here? AFAIK, sending JSON An other approach would be to check if the provided JSON |
Angular will automatically strip ")]}',\n" from json responses.
https://docs.angularjs.org/api/ng/service/$http
http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx/
The text was updated successfully, but these errors were encountered: