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

Update nb_conda to be compatible with 4.3.1 and higher #48

Merged
merged 4 commits into from
Apr 12, 2017

Conversation

awkwong-whi
Copy link
Contributor

Jupyter notebook blog post about version 4.3.1 introduced a fix for CVE-2016-9971 but in doing so, caused some issues for RESTful interfaces.

When the nb_conda extension is activated (and tested with Notebook version 4.4.1), actions like installing a package generates a "Forbidden" error dialog and the server log only shows a 403 error on the POST url:

[W 00:44:28.973 NotebookApp] 403 POST /conda/environments/root/packages/install (n.n.n.n): '_xsrf' argument missing from POST

Since the code already references the base/js/utils module, and that module already implements the sample code shown in the blog post, and that module also exports the ajax function, the cleanest update is to change all $.ajax(...) calls to just utils.ajax(...) calls. For the modules that did not already require the utils module, I added that in to provide the right ajax call.

@damianavila
Copy link
Contributor

Thanks for the PR, I will look into it as soon as possible.

@damianavila
Copy link
Contributor

Tested locally, working OK. Will fix the tests in a upcoming PR.
Thanks for the _xsrf fix @awkwong-whi !!!

@damianavila damianavila merged commit bfbc9eb into anaconda:master Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants