Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

[core] support empty CSRF token #7

Merged
merged 4 commits into from
Sep 19, 2018
Merged

Conversation

williaster
Copy link
Contributor

馃弳 Enhancements

  • This PR adds support for csrf_token='' to SupersetClient, to support the case when the Superset Flask app sets WTF_CSRF_ENABLED = False. This is valid configuration and is used in e.g., cypress tests, and when this is set to False, the superset/csrf_token endpoint returns a 200 with an empty string. Without this support, Cypress tests fail when integrating SupersetClient.

馃彔 Internal

  • removes unneeded polyfill (used previously as another method for encoding POST payload form data)
  • adds a test to ensure that parseResponse rejects when response.ok=false

@kristw @michellethomas @graceguo-supercat @conglei

@codecov
Copy link

codecov bot commented Sep 19, 2018

Codecov Report

Merging #7 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
+ Coverage    98.5%   98.52%   +0.02%     
==========================================
  Files           7        7              
  Lines          67       68       +1     
==========================================
+ Hits           66       67       +1     
  Misses          1        1
Impacted Files Coverage 螖
packages/superset-ui-core/src/callApi/callApi.js 100% <酶> (酶) 猬嗭笍
...ages/superset-ui-core/src/callApi/parseResponse.js 100% <100%> (+11.11%) 猬嗭笍
packages/superset-ui-core/src/SupersetClient.js 97.56% <100%> (-2.44%) 猬囷笍

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 4653bd4...36446ec. Read the comment docs.

Copy link
Contributor

@kristw kristw left a comment

Choose a reason for hiding this comment

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

lgtm

@williaster williaster merged commit af9038e into master Sep 19, 2018
@williaster williaster deleted the chris--support-empty-token branch September 19, 2018 00:30
@kristw kristw added reviewable Ready for review and removed reviewable Ready for review labels Nov 13, 2018
kristw pushed a commit that referenced this pull request Apr 17, 2020
)

* fix(legacy-preset-chart-nvd3): redraw bar values after legend change

* fix(legacy-preset-chart-nvd3): avoid creating multiple nodes

* fix(legacy-preset-chart-nvd3): improve remove
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants