Skip to content
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

IntegrityError should jsonify exception.orig #280

Closed
hallister opened this issue Jan 16, 2014 · 2 comments
Closed

IntegrityError should jsonify exception.orig #280

hallister opened this issue Jan 16, 2014 · 2 comments
Labels

Comments

@hallister
Copy link

@hallister hallister commented Jan 16, 2014

When an IntegrityError occurs on a post request, the json response should be exception.orig not the entire exception. Returning a stringified exception results in the client getting the entire error, including the SQL statement that was executed. That has obvious security implications.

@jfinkels jfinkels added the bug label Mar 12, 2014
@jfinkels
Copy link
Owner

@jfinkels jfinkels commented Mar 12, 2014

Thanks for the report. This should be an easy fix...

Loading

@glyphobet
Copy link
Contributor

@glyphobet glyphobet commented Aug 1, 2014

exception.orig would be better, but it still has the full contents of the row, like this:

IntegrityError('null value in column "foo" violates not-null constraint\nDETAIL:  Failing row contains (blah, blah, blah, blah).\n',)

Some of these column values may be sensitive data (passwords, for instance). I would say just raise type(exception).__name__.

Loading

glyphobet added a commit to goodscloud/flask-restless that referenced this issue Aug 3, 2014
glyphobet added a commit to goodscloud/flask-restless that referenced this issue Aug 5, 2014
@jfinkels jfinkels closed this in #343 Aug 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants