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

Set longer CSRF token duration (one week) #4741

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Apr 3, 2018

Default is one hour (3600), also this entry makes the setting a bit more
discoverable
http://flask-wtf.readthedocs.io/en/stable/config.html?highlight=csrf

closes #4739

Default is one hour (3600), also this entry makes the setting a bit more
discoverable
http://flask-wtf.readthedocs.io/en/stable/config.html?highlight=csrf
@codecov-io
Copy link

Codecov Report

Merging #4741 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4741      +/-   ##
==========================================
+ Coverage   72.25%   72.25%   +<.01%     
==========================================
  Files         205      205              
  Lines       15349    15350       +1     
  Branches     1182     1182              
==========================================
+ Hits        11090    11091       +1     
  Misses       4256     4256              
  Partials        3        3
Impacted Files Coverage Δ
superset/config.py 92.3% <100%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 969ff0c...543d201. Read the comment docs.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but we should have a better way of surfacing that the token expired. Ideally we'd redirect the user to the login page if the token expired, instead of just showing up an error message saying Unexpected error in the UI.

Right now when I see the Unexpected error message in the UI I know it's an expired token, because it happens frequently. I'm worried that a year from now we'll see the message and spend hours troubleshooting until we remember that it's caused by an expired token.

@mistercrunch
Copy link
Member Author

I think SQL Lab surfaces the error properly and the explore view does give Unexpected error. Let me open an issue. Here: #4762

@mistercrunch mistercrunch merged commit adda30b into apache:master Apr 4, 2018
@mistercrunch mistercrunch deleted the csrf_token branch April 4, 2018 22:55
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Apr 11, 2018
Default is one hour (3600), also this entry makes the setting a bit more
discoverable
http://flask-wtf.readthedocs.io/en/stable/config.html?highlight=csrf
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
Default is one hour (3600), also this entry makes the setting a bit more
discoverable
http://flask-wtf.readthedocs.io/en/stable/config.html?highlight=csrf
timifasubaa pushed a commit to timifasubaa/incubator-superset that referenced this pull request May 31, 2018
Default is one hour (3600), also this entry makes the setting a bit more
discoverable
http://flask-wtf.readthedocs.io/en/stable/config.html?highlight=csrf
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
Default is one hour (3600), also this entry makes the setting a bit more
discoverable
http://flask-wtf.readthedocs.io/en/stable/config.html?highlight=csrf
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The CSRF token has expired
3 participants