-
Notifications
You must be signed in to change notification settings - Fork 441
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
JBrowse: enable callbacks in style options #2442
JBrowse: enable callbacks in style options #2442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Can you bump the tool +galaxy version number?
ok, but I am not sure which number to bump. This one: |
yep! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this contribution @loraine-gueguen.
But I'm not sure we should merge this. We wrote those sanitisation routines to prevent exactly this, that user-input javascript code is executed.
Galaxy normally strips all such content from displayed HTML files to protect users. We wanted to provide more rich html content but still offer (our best attempt at) a similar protection.
Any code executing on such a page will have access to galaxy resources that they shouldn't, and can execute calls on behalf of the executing user. You could imagine a malicious jbrowse shared by a colleague which wiped out all of your datasets.
Edit: let me go verify these claims I'm making.
I can definitely see this being useful to some groups, but I'm not sure how to balance the security implications against the utility. I'm afraid I'm leaning towards the more secure option.
Ah yes, it could be dangerous indeed, hadn't thought about that... |
It's framed, so accessing current page content isn't as much of an issue. I'd worry about it making requests on behalf of the current user though. With the JBrowse tool whitelisted, pages with this content will return the user's history.
You can make GET, PUT, etc. Updating / deleting histories is pretty easy. |
I agree this not very secure... Note that Javascript is already enabled for custom config options (I tried with a fmtDetailValue option): https://github.com/galaxyproject/tools-iuc/blob/master/tools/jbrowse/jbrowse.py#L711 So would need to be secured as well... So what would be the best solution? Here are some use cases with callbacks, I can think of:
|
Those are all very valid use cases. If we (on the galaxy side) can ever get around to implementing galaxyproject/galaxy#1932 then we could safely add this feature without worrying. As it is, this could be some time :( Could we maybe identify a subset of useful / interesting cases? Those are nice but are there maybe others?
Oh shoot, we missed that.
Your snipet looks so familiar :) I think I once wrote a snippet that looked very like that. I always wanted to include it more properly in JBrowse but never had the time. Definitely something jbrowse should be taking care of for users. |
FOR CONTRIBUTOR:
Fixes #2441