igvteam / igv-utils

5 stars 5 forks source link

do not append `someRandomSeed` if the url is a signed Google Storage url #17

Closed neilpoulin closed 2 years ago

neilpoulin commented 2 years ago

A fix to allow for signed google urls to be used unaltered. Appending the someRandomSeed breaks the signature and the files can no be loaded. I copied the pattern used for Amazon URLs, which I would bet ran into the same issue. Helps fix issue #16

jrobinso commented 2 years ago

Yes, got it. The random seed is to prevent Safari from caching inappropriately, but that's an old bug (in Safari) that hopefully has been fixed.

jrobinso commented 2 years ago

We could use that same test to prevent URL mapping. I plan to look back to find what issues the various mappings address and if they are still relevant when I return next week, but in the meantime simply testing if its signed and not mapping if yes might address your issue. Perhaps surprisingly this is the first instance of signed urls from a Google platform I've encountered, thus exposing some problems, its very common on AWS.

neilpoulin commented 2 years ago

Totally agree with your comment about checking if it's a signed url to stop the url mapping/transformation. I think the Amazon and Google checks for a signature param that are (now) in the codebase cover many/most of the common use cases. I'm happy to put up a PR for you to review when you get back next week - look for one coming your way in the next 24 hours or so.