GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Regression in storage url signing · Issue #1346 · googleapis/google-cloud-java

Regression in storage url signing #1346

New issue
Copy link
New issue
Copy link
Closed
#1348
Closed
Regression in storage url signing#1346
#1348
Copy link
Assignees
mziccard

Description

@mickeyreiss
mickeyreiss
opened on Oct 28, 2016
Issue body actions

@ostronom @mziccard It seems #1277 has caused a regression in my code. I use / characters in the blob names, and they are now being unexpectedly encoded as %2F in the signed path.

It seems that object naming requirements are not equivalent to URL encoding.

When I round-trip a signed url, Storage#get now fails to find the successfully uploaded file (confirmed via gsutil and Cloud Console).

My understanding is that /s are valid characters for blob names. From the same page quoted above:

The canonical resource is everything that follows the host name. For example, if the Cloud Storage URL is https://storage.googleapis.com/example-bucket/cat-pics/tabby.jpeg, then the canonical resource is /example-bucket/cat-pics/tabby.jpeg.

It seems like this library needs to use a different escape function for object names. (Also, I noticed that the new test testSignUrlForBlobWithSpecialChars, does not cover slashes.)

Does this make sense? What is the intended behavior for blob names containing slashes?


repro test:

    BlobInfo blobInfo1 = BlobInfo.builder(bucketName, "foo/bar/baz #%20other cool stuff.txt").build();
    storage.create(blobInfo1, "content".getBytes());
    URL url = storage.signUrl(
        blobInfo1,
        1,
        TimeUnit.HOURS,
        httpMethod(HttpMethod.PUT),
        httpMethod(HttpMethod.GET)
    );
    final String[] split = url.getPath().split("/");
    Blob notFound = storage.get(split[1], split[2]); // unexpectedly null!
    Blob found = storage.get(split[1], URLDecoder.decode(split[2])); // found, surprisingly

Activity

  1. ostronom commented on Oct 28, 2016

    @ostronom
    ostronom
    on Oct 28, 2016
    More actions

    Yes, i do confirm it is a bug. I will make PR it ASAP.

    Haven't you considered Content-Disposition as a workaround?

  2. mickeyreiss commented on Oct 28, 2016

    @mickeyreiss
    mickeyreiss
    on Oct 28, 2016
    Author
    More actions

    Thanks, @ostronom.

    The Content-Disposition trick is an interesting idea. I'll consider that!

  3. ostronom
    added a commit that references this issue on Oct 28, 2016

    Regression in storage url signing of objects with slashes in names fi…

    0c65bcf
  4. mziccard
    closed this as completedin #1348on Oct 28, 2016
  5. mickeyreiss commented on Oct 31, 2016

    @mickeyreiss
    mickeyreiss
    on Oct 31, 2016
    Author
    More actions

    @mziccard any chance you can cut a point release that includes this fix?

  6. mziccard commented on Oct 31, 2016

    @mziccard
    mziccard
    on Oct 31, 2016
    Contributor
    More actions

    Ehi @mickeyreiss this is already out as part of google-cloud 0.5.0, see release notes

    Reacted by Mickey Reiss
  7. mickeyreiss commented on Nov 1, 2016

    @mickeyreiss
    mickeyreiss
    on Nov 1, 2016
    Author
    More actions

    @mziccard Sorry for the noise. Thanks!

  8. JustinBeckwith
    assigned
    mziccard
    on Feb 1, 2021
  9. github-actions
    added a commit that references this issue on Sep 16, 2022

    chore(main): release 3.6.1-SNAPSHOT (#1346)

    8992ee7
  10. meltsufin
    added a commit that references this issue on Dec 22, 2025

    chore(deps): update dependency com.google.cloud:google-cloud-logging …

    6662345
  11. chingor13
    added a commit that references this issue on Jan 6, 2026

    test(deps): update dependency com.google.truth:truth to v1.4.4 (#1346)

    2568306
  12. chingor13
    added a commit that references this issue on Jan 22, 2026

    feat: Java datastore gapic upgrade (#1824)

    a296d43
  13. chingor13
    added a commit that references this issue on Feb 24, 2026

    feat: adds universe domain support for compute credentials (#1346)

    7e26861
  14. suztomo
    added a commit that references this issue on Mar 11, 2026

    chore(deps): update dependency com.google.cloud:google-cloud-logging …

    99d24de
  15. chingor13
    added a commit that references this issue on Mar 12, 2026

    feat: adds universe domain support for compute credentials (#1346)

    30d9d00
  16. lqiu96
    added a commit that references this issue on Mar 20, 2026

    feat: Java datastore gapic upgrade (#1824)

    b80fba0
  17. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    8fba81c
  18. suztomo
    added a commit that references this issue on Mar 30, 2026

    test(deps): update dependency com.google.truth:truth to v1.4.0 (#1346)

    e8dc749
  19. lqiu96
    added a commit that references this issue on Apr 1, 2026

    test(deps): update dependency com.google.truth:truth to v1.4.0 (#1346)

    77b7262
  20. benjaminp
    added a commit that references this issue on Jul 13, 2026

    feat: Support Cloud Bigtable Changestream (googleapis#1569)

    99071f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.