• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 28437115472
86%

Build:
DEFAULT BRANCH: main
Ran 30 Jun 2026 10:18AM UTC
Jobs 8
Files 80
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jun 2026 10:17AM UTC coverage: 85.605% (+0.003%) from 85.602%
28437115472

push

github

web-flow
fix(storage): percent-encode object paths in request URLs (#1479)

## What

Object keys are now percent-encoded when building Storage request URLs,
so keys containing characters that are reserved in a URL (like `?`, a
space, `:` or `+`) address the correct object instead of corrupting the
URL.

## Why

`_getFinalPath` built the URL path by raw interpolation:

```dart
String _getFinalPath(String path) {
  return '$bucketId/$path';
}
```

The result is passed to `Uri.parse('$url/object/$finalPath')` (and the
`render/...` / `object/sign/...` variants). When the key contains a
reserved character it breaks the URL, most visibly in `download`:

```dart
var fetchUrl = Uri.parse('$url/$renderPath/$finalPath');
fetchUrl = fetchUrl.replace(queryParameters: query);
```

`download('a?b.png')` parses the `?` as the start of the query string,
so `.replace(queryParameters: ...)` discards everything after it and the
SDK silently fetches the wrong object. A space can make `Uri.parse`
throw.

The fix percent-encodes each segment using RFC 3986 path-segment rules:

```dart
final encodedPath = Uri(pathSegments: path.split('/')).path;
return '$bucketId/$encodedPath';
```

This encodes the characters that actually corrupt a URL (`?`, `#`, `%`,
spaces) while leaving characters that are already valid in a path
segment untouched, so existing keys (for example ISO-8601 timestamps
containing `:`) produce byte-identical URLs.

## This matches what the storage server does

The storage server percent-decodes the path segments back to the literal
key, so an encoded URL and the literal object key resolve to the same
object. This was verified end to end against a local stack (upload, then
download and list): keys containing `?`, a space, `:`, `+`, `,`, `@`,
`=`, `&` and `;` round-trip correctly and are stored under their decoded
names.

Note that `#` and `%` are rejected by the storage server's own key
validation (`InvalidKey`) regardless of encoding, so this change does
not make tho... (continued)

2 of 2 new or added lines in 1 file covered. (100.0%)

4133 of 4828 relevant lines covered (85.6%)

3.74 hits per line

Jobs
ID Job ID Ran Files Coverage
6 supabase_flutter - 28437115472.6 30 Jun 2026 10:19AM UTC 11
78.73
GitHub Action Run
7 storage_client - 28437115472.7 30 Jun 2026 10:20AM UTC 5
92.98
GitHub Action Run
8 supabase - 28437115472.8 30 Jun 2026 10:18AM UTC 15
81.8
GitHub Action Run
7 realtime_client - 28433368938.7 30 Jun 2026 09:15AM UTC 11
88.4
GitHub Action Run
2 gotrue - 28433368938.2 30 Jun 2026 09:15AM UTC 26
84.2
GitHub Action Run
3 yet_another_json_isolate - 28433368938.3 30 Jun 2026 09:12AM UTC 1
79.03
GitHub Action Run
5 functions_client - 28433368938.5 30 Jun 2026 09:12AM UTC 2
98.57
GitHub Action Run
4 postgrest - 28433368938.4 30 Jun 2026 09:14AM UTC 9
84.29
GitHub Action Run
Source Files on build 28437115472
  • Tree
  • List 80
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28437115472
  • ffe4c256 on github
  • Prev Build on main (#28433368938)
  • Next Build on main (#28444101116)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc