-
Notifications
You must be signed in to change notification settings - Fork 312
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
Allow query strings for precomputed chunks URLs #316
Comments
I think this would be reasonable to support. The only downside is that it prevents using the query string for any neuroglancer-specific parameters. But instead |
As I was messing around with this, I also discovered a bug (or maybe a feature, depending on how you look at it), so I figured I'd ask before I submit a PR. the
Now, this works, but doesn't look at all like something I should be doing. It is useful in some cases, though. I haven't given too much thought to the security implications, but in principle it seems that the scale keys could work just like any other URLs on HTML elements: relative paths would be relative to the path of the info file, absolute paths would start from the info file domain, and paths with a preceding protocol would be able to point anywhere on the web, including other domains. And then I still managed to achieve what I was trying to do by awkwardly redirecting every request for a tile to the third-party URL where that tile resides, but that introduces one unnecessary round trip and is some more pointless load on my server. Any thoughts on that? |
This was indeed not intended functionality. I don't think there is any security risk in Neuroglancer, since neuroglancer supports only read access, but I think it would be better not to allow it in order to avoid incompatibility with other implementations. If this were supported by implementations like tensorstore that support writing, it could be used similarly to a symlink attack to overwrite unintended data, though I suppose there could be an option to limit the allowed redirect destinations. The other issue is that it would force other implementations to support the same protocols as neuroglancer. Neuroglancer currently supports some custom protocols like gs:// and gs+ngauth://, and it would be somewhat unfortunate to have to support these in other implementations. In tensorstore there is also an explicit key-value store abstraction, that the precomputed format is built on top of, and this redirect functionality doesn't really fit with that. On the other hand potentially this redirect functionality could be documented as being supported exclusively by neuroglancer. |
Currently, neuroglancer will error out on datasets of the kind
precomputed://http://
if they contains query parameters. This is particularly annoying when serving data from Opentsack Swift's temporary URLs, since those come with signatures in the query parameters.It seems natural to allow URLs to be derived from the base URL as usual, but also appending the query params to the string, but I haven't given too much thought on what consequences that could have.
The text was updated successfully, but these errors were encountered: