-
Notifications
You must be signed in to change notification settings - Fork 24
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
Enhance webknossos security #1685
Comments
That's not a bug, that's a feature :D |
Can we allow "safe" HTML there? Perhaps Markdown? |
@daniel-wer are the remaining items here still open? Is any of that easily done? Or can we possibly close this issue? |
(1)
As we're using a GET token to authenticate requests to the datastore (not a Cookie which would be sent automatically by the browser), the SOP is not that important. If a user visits a malicious website which makes a request to the datastore, the request will be unauthenticated and not return anything. (2)
I would do that, otherwise webKnossos will be open to click jacking attacks. I've prepared a quick demo for that, if you're logged in to webknossos in another tab, a malicious website could do this: (3)
As we're using react to render almost everything, which takes care of escaping user supplied data, this does not have high priority. We're not using dangerouslySetInnerHTML, user supplied href prop values or HTML enabled markdown - all things that could lead to XSS even when using React - so I would argue we're pretty safe. It would nevertheless be worthwhile to investigate this as part of another issue and proactively create a Content-Security-Policy (https://content-security-policy.com/) to avoid future possible XSS vectors. Summarizing, (1) is not needed, (2) should be easily done, (3) worthwhile but low-pri, I'll create a separate issue for that. |
Thanks for investigating! |
Great, I created issue #3085 to track progress regarding the CSP. |
In my recent talk I've pointed out several issues and ways to enhance webknossos security, which should be addressed.
[ ] Restrict lifetime of Play Session IDs (https://www.playframework.com/documentation/2.5.x/ScalaSessionFlash)→ we don’t store anything in the sessions, cookie/auth token lifetime is separate[ ] Adjust Same-Origin Policy (CORS headers) for Datastore to no longer be "*"→ we use token-based authentication for datastore, no cookiesLog Time
The text was updated successfully, but these errors were encountered: