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

supabase / supabase-flutter / 28245085940
86%

Build:
DEFAULT BRANCH: main
Ran 26 Jun 2026 02:40PM 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

26 Jun 2026 02:38PM UTC coverage: 85.619%. Remained the same
28245085940

push

github

web-flow
fix(gotrue): copy request header/query maps before mutating them (#1476)

## What

`GotrueFetch.request()` now copies the request header and query maps
before mutating them, so per-request values (`Authorization`, the API
version header, `Content-Type`, `redirect_to`) no longer leak into the
client's shared `_headers`.

## Why

`GoTrueClient` keeps a single `_headers` map and passes it **by
reference** to almost every request (`headers: _headers`). `request()`
aliased that map and wrote into it directly:

- `headers['Authorization'] = 'Bearer ${options.jwt}'` for any
jwt-bearing call
- the `x-supabase-api-version` header
- `headers['Content-Type']` for non-GET requests (in `_handleRequest`)

So after any authenticated call — `getUser(jwt)`, `updateUser`, MFA,
passkeys — the user's access token stayed in the client's default
headers and was sent on every later request, including unauthenticated
endpoints and requests made *after* `signOut`. Because requests
interleave on the event loop, a no-jwt request could also pick up
another in-flight request's token. The query map was aliased the same
way through `redirect_to`.

## Not a breaking change

The copies are local to `request()`; the headers actually sent on each
request are identical to before. The only thing that changes is that the
shared map is no longer polluted — which is purely a fix.

## Tests

Added `packages/gotrue/test/header_isolation_test.dart`: after
`getUser(jwt)` the token is present on the wire but absent from
`client.headers`, and the header map is unchanged across repeated calls.
Without the fix both assertions fail.

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

4108 of 4798 relevant lines covered (85.62%)

3.69 hits per line

Jobs
ID Job ID Ran Files Coverage
6 supabase_flutter - 28245085940.6 26 Jun 2026 02:41PM UTC 11
77.99
GitHub Action Run
7 supabase - 28245085940.7 26 Jun 2026 02:40PM UTC 15
81.99
GitHub Action Run
8 gotrue - 28245085940.8 26 Jun 2026 02:42PM UTC 26
84.31
GitHub Action Run
4 functions_client - 27986095786.4 22 Jun 2026 09:45PM UTC 2
97.14
GitHub Action Run
7 yet_another_json_isolate - 27986095786.7 22 Jun 2026 09:45PM UTC 1
79.03
GitHub Action Run
8 realtime_client - 28190414303.8 25 Jun 2026 06:08PM UTC 11
88.5
GitHub Action Run
6 postgrest - 28231764812.6 26 Jun 2026 10:17AM UTC 9
84.31
GitHub Action Run
5 storage_client - 28160249676.5 25 Jun 2026 09:26AM UTC 5
92.97
GitHub Action Run
Source Files on build 28245085940
  • Tree
  • List 80
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28245085940
  • fe8a84d0 on github
  • Prev Build on main (#28241867675)
  • Next Build on main (#28254051980)
  • 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