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

Don't use POST method for sql_select/explain #116

Closed
wants to merge 1 commit into from

Conversation

pgiraud
Copy link
Contributor

@pgiraud pgiraud commented Oct 5, 2017

I've installed the debug toolbar on my application and it works well. Thanks.

But because I was using Flask_WTF with CSRF protection, I was receiving 400 Bad Request errors each time I was clicking on the SELECT or EXPLAIN link in the SQLAlchemy panel.
Of course, I found a proper way to handle this with better configuration of the CSRF protection in my app.

However I don't think that we need to use the POST method for the sql_select or sql_explain routes.

This pull request makes sure that we only accept GET and that the browser uses the correct method to call the service (using JQuery load method).

@caffeinatedMike
Copy link
Contributor

caffeinatedMike commented Aug 18, 2022

@pgiraud While I also face this issue with the SQLAlchemy query panel, using GET is not the best approach seeing as complicated queries can easily surpass the url length limit. See #156 for how we can fix the issue.

@jeffwidman
Copy link
Member

Thanks for swinging by @caffeinatedMike. I totally forgot about the url length limit! Good call.

Always happy to review a PR if you want to suggest an alternative approach. 😄

@caffeinatedMike
Copy link
Contributor

@jeffwidman the approach suggested in #156 is the way to go. Sorry I haven't been able to carve out any time to create a PR for it.

@macnewbold
Copy link
Contributor

I know it's been a little while, but do you still have any interest in this?
If so, it will need to catch it up with master and retest. If not, we'll probably close it out.

@pgiraud pgiraud closed this Nov 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants