google-cloud-node: @google-cloud/storage file getSignedUrl returns trailing dot in URL
Upon updating @google-cloud/storage to the latest package version (1.1.0) introduced a trailing dot in the url.
For example: https://storage.googleapis.com./<bucket name>/<file name>...
I’ve traced the cause of this due to GoogleCloudPlatform/google-cloud-node#2214
It seems valid by FQDN, on iOS, curl and wget no issue, but on Android: HTTP FAILED: javax.net.ssl.SSLHandshakeException: java.lang.IllegalArgumentException: Server name value of host_name cannot have the trailing dot
(using OkHttp and Fresco)
Is this by design?
Environment details
- OS: Heroku and MacOS
- Node.js:
6.10.2
- yarn version:
0.23.2
"@google-cloud/storage": "^1.1.0"
Steps to reproduce
- generate a signedUrl for file
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16 (9 by maintainers)
@stephenplusplus Can you release a 1.1.1 today to fix this on Android?
Ironically, I got a request from another customer asking for the addition of the trailing
.
in all seven languages. I think we should potentially consider a flag. It is increasingly clear that some people really do need this. My original reason for saying no in #2214 was essentially, “We should not opt everyone in to this – it might not work everywhere.” But giving folks a way to get this behavior clearly has value.@stephenplusplus FYI GoogleCloudPlatform/google-cloud-node#2214 was IMHO an opinionated discussion with @lukesneeringer being a minority “No” person.
I think the decision was made without being aware to the limitations of other environments support for “Absolute domain name” (which I agree is lacking, but simply because it isn’t widespread)
IMHO many will agree that this change needs to be reverted ASAP (as
1.1.1
), as once more node.js based deployments will pull the1.1.0
version, many remote clients which uses signed URLs will start failing on invalid URLs. This isn’t some some minor component failing, we’re talking about all Android devices (usingjavax.net.ssl
)@shaibt I’ve updated on SO that our solution for the problem was to add a temporary URI overwriter (to remove the trailing dot, might be done very efficiently using just a regex, but we choose to parse and reconstruct after fixing the the hostname trailing dot).
We were actually amazed that Alamofire and iOS handled it pretty good compare to android (and Java)
@lukesneeringer should we:
.
change in getSignedUrl().
change in getSignedUrl().
change in the Storage API.
change in our whole API