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

tornado 4.2.1 security update breaks tornado_xstatic #2

Open
mgmarino opened this issue Jul 22, 2015 · 2 comments
Open

tornado 4.2.1 security update breaks tornado_xstatic #2

mgmarino opened this issue Jul 22, 2015 · 2 comments

Comments

@mgmarino
Copy link

Recent updates to tornado break the tornado_xstatic service (due to the use of root='/'), see tornadoweb/tornado@ecb3ea7 . The security update has the (intended or unintended?) effect that root='/' is no longer possible.

Basically, os.path.sep is now appended to root, meaning that the subsequent check fails. Typical failure message:

WARNING:tornado.general:403 GET /xstatic/termjs/term.js?v=a1c04b2327100ce4f16e3d96cf92035b (::1): termjs/term.js is not in root static directory

Perhaps the root can be defined using xstatic.__path__[0] (which would need to be subsequently stripped in _get_xstatic_data_dir)? Shouldn't all xstatic packages be located under this?

@takluyver
Copy link
Owner

That's annoying. XStatic is a namespace package, which means that different parts may be installed in different locations. I'll see what's possible.

@liudonghua123
Copy link
Contributor

I also have this problems, and finally I fixed it via #4.

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

No branches or pull requests

3 participants