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

supabase / supabase-py / 42004898218
98%

Build:
DEFAULT BRANCH: main
Ran 05 Nov 2026 09:45AM UTC
Jobs 42
Files 122
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

05 Nov 2026 09:44AM UTC coverage: 95.34% (+0.1%) from 95.241%
42004898218

push

github

web-flow
fix(utils): drop credential headers on cross origin redirects (#1994)

## What this changes

The `supabase_utils` httpx and aiohttp adapters now remove the `apikey`
and `Authorization` headers once a redirect leaves the origin (scheme,
host and port) of the original request, and keep them off every later
hop, even one that comes back to the original origin. Redirects that
stay on the original origin, or upgrade from `http` to `https` on the
same host (the same exception httpx makes for `Authorization`), keep
both headers. Whether redirects are followed at all is still up to the
client's own configuration.

## The problem

httpx and aiohttp only strip `Authorization` when a redirect leaves the
origin. The `apikey` header is forwarded unchanged. On a server this is
often the `service_role` key, so an Edge Function (or any endpoint) that
redirects to an outside host leaks it. The default clients from
`supabase.httpx` follow redirects, and aiohttp follows them by default.

v2 fixed this for functions in #1885, but the fix never reached v3. In
v3 every package only receives a session, so the fix lives in the shared
adapters and covers every package and both HTTP libraries.

## The fix

- `supabase_utils.http.redirects`: one origin rule (`keeps_credentials`)
and the list of credential headers, shared by both adapters.
- httpx: the adapter sends with `follow_redirects=False` and follows
`response.next_request` itself when `client.follow_redirects` is set.
httpx still builds every redirect request (method changes, cookies,
`Host`), and `max_redirects` and `TooManyRedirects` behave as before.
Before each cross origin hop, the credential headers are removed. Hops
are sent with `auth=None`, so the client's `auth` is applied once to the
first request, as httpx does natively, and is not added back to a cross
origin hop.
- aiohttp: the adapter adds a per request client middleware, which
aiohttp runs on every redirect hop, that removes the credential headers
from th... (continued)

9473 of 9936 relevant lines covered (95.34%)

5.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 storage-py3.15-highest - 42004898218.1 05 Nov 2026 09:47AM UTC 22
93.68
GitHub Action Run
2 utils-py3.13-highest - 42004898218.2 05 Nov 2026 09:45AM UTC 19
99.5
GitHub Action Run
3 utils-py3.15-highest - 42004898218.3 05 Nov 2026 09:45AM UTC 19
99.48
GitHub Action Run
4 utils-py3.11-lowest-direct - 42004898218.4 05 Nov 2026 09:45AM UTC 19
99.5
GitHub Action Run
5 functions-py3.12-highest - 42004898218.5 05 Nov 2026 09:45AM UTC 14
97.48
GitHub Action Run
6 utils-py3.12-highest - 42004898218.6 05 Nov 2026 09:45AM UTC 19
99.5
GitHub Action Run
7 supabase-py3.12-highest - 42004898218.7 05 Nov 2026 09:45AM UTC 22
97.77
GitHub Action Run
8 functions-py3.11-highest - 42004898218.8 05 Nov 2026 09:45AM UTC 14
97.48
GitHub Action Run
9 functions-py3.14-highest - 42004898218.9 05 Nov 2026 09:45AM UTC 14
97.48
GitHub Action Run
10 supabase-py3.13-highest - 42004898218.10 05 Nov 2026 09:45AM UTC 22
97.77
GitHub Action Run
11 utils-py3.14-highest - 42004898218.11 05 Nov 2026 09:45AM UTC 19
99.48
GitHub Action Run
12 utils-py3.11-highest - 42004898218.12 05 Nov 2026 09:45AM UTC 19
99.5
GitHub Action Run
13 storage-py3.11-highest - 42004898218.13 05 Nov 2026 09:46AM UTC 22
93.71
GitHub Action Run
14 functions-py3.13-highest - 42004898218.14 05 Nov 2026 09:45AM UTC 14
97.48
GitHub Action Run
15 auth-py3.11-highest - 42004898218.15 05 Nov 2026 09:45AM UTC 36
91.55
GitHub Action Run
16 realtime-py3.12-highest - 42004898218.16 05 Nov 2026 09:46AM UTC 8
95.88
GitHub Action Run
17 realtime-py3.11-highest - 42004898218.17 05 Nov 2026 09:46AM UTC 8
95.88
GitHub Action Run
18 postgrest-py3.14-highest - 42004898218.18 05 Nov 2026 09:46AM UTC 24
97.5
GitHub Action Run
19 realtime-py3.11-lowest-direct - 42004898218.19 05 Nov 2026 09:46AM UTC 8
95.88
GitHub Action Run
20 supabase-py3.14-highest - 42004898218.20 05 Nov 2026 09:45AM UTC 22
97.76
GitHub Action Run
21 storage-py3.11-lowest-direct - 42004898218.21 05 Nov 2026 09:46AM UTC 22
93.71
GitHub Action Run
22 functions-py3.11-lowest-direct - 42004898218.22 05 Nov 2026 09:45AM UTC 14
97.48
GitHub Action Run
23 auth-py3.14-highest - 42004898218.23 05 Nov 2026 09:45AM UTC 36
91.52
GitHub Action Run
24 auth-py3.13-highest - 42004898218.24 05 Nov 2026 09:45AM UTC 36
91.55
GitHub Action Run
25 realtime-py3.13-highest - 42004898218.25 05 Nov 2026 09:46AM UTC 8
95.88
GitHub Action Run
26 supabase-py3.15-highest - 42004898218.26 05 Nov 2026 09:46AM UTC 22
97.76
GitHub Action Run
27 functions-py3.15-highest - 42004898218.27 05 Nov 2026 09:45AM UTC 14
97.48
GitHub Action Run
28 postgrest-py3.11-highest - 42004898218.28 05 Nov 2026 09:46AM UTC 24
97.51
GitHub Action Run
29 supabase-py3.11-lowest-direct - 42004898218.29 05 Nov 2026 09:45AM UTC 22
97.77
GitHub Action Run
30 auth-py3.15-highest - 42004898218.30 05 Nov 2026 09:46AM UTC 36
91.52
GitHub Action Run
31 storage-py3.12-highest - 42004898218.31 05 Nov 2026 09:46AM UTC 22
93.71
GitHub Action Run
32 auth-py3.11-lowest-direct - 42004898218.32 05 Nov 2026 09:46AM UTC 36
91.55
GitHub Action Run
33 realtime-py3.14-highest - 42004898218.33 05 Nov 2026 09:46AM UTC 8
95.34
GitHub Action Run
34 auth-py3.12-highest - 42004898218.34 05 Nov 2026 09:45AM UTC 36
91.55
GitHub Action Run
35 storage-py3.14-highest - 42004898218.35 05 Nov 2026 09:46AM UTC 22
93.68
GitHub Action Run
36 supabase-py3.11-highest - 42004898218.36 05 Nov 2026 09:45AM UTC 22
97.77
GitHub Action Run
37 realtime-py3.15-highest - 42004898218.37 05 Nov 2026 09:46AM UTC 8
95.34
GitHub Action Run
38 postgrest-py3.13-highest - 42004898218.38 05 Nov 2026 09:46AM UTC 24
97.51
GitHub Action Run
39 postgrest-py3.12-highest - 42004898218.39 05 Nov 2026 09:46AM UTC 24
97.51
GitHub Action Run
40 postgrest-py3.11-lowest-direct - 42004898218.40 05 Nov 2026 09:46AM UTC 24
97.51
GitHub Action Run
41 postgrest-py3.15-highest - 42004898218.41 05 Nov 2026 09:46AM UTC 24
97.5
GitHub Action Run
42 storage-py3.13-highest - 42004898218.42 05 Nov 2026 09:46AM UTC 22
93.71
GitHub Action Run
Source Files on build 42004898218
  • Tree
  • List 122
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42004898218
  • 72bf7606 on github
  • Prev Build on main (#42004781188)
  • Next Build on main (#42005876479)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc