Skip to content

sources/oauth: correctly check requests' exception response#21386

Open
BeryJu wants to merge 1 commit intomainfrom
sources/oauth/correct-check-requests-exc
Open

sources/oauth: correctly check requests' exception response#21386
BeryJu wants to merge 1 commit intomainfrom
sources/oauth/correct-check-requests-exc

Conversation

@BeryJu
Copy link
Copy Markdown
Member

@BeryJu BeryJu commented Apr 4, 2026

This is something I noticed during #21383

Python requests' Response class implements __bool__, where it returns self.ok, meaning that in an exception, checking if a response is available via if exc.response ... will always return false. The correct check is if exc.response is not None ....

...sigh

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu requested a review from a team as a code owner April 4, 2026 21:27
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 4, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 75e8253
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69d18242f2277900094d1a28
😎 Deploy Preview https://deploy-preview-21386--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.44%. Comparing base (d5ee53f) to head (75e8253).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
authentik/sources/oauth/api/source.py 0.00% 2 Missing ⚠️
authentik/sources/oauth/tasks.py 0.00% 2 Missing ⚠️
authentik/events/models.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21386      +/-   ##
==========================================
- Coverage   92.48%   92.44%   -0.04%     
==========================================
  Files        1013     1013              
  Lines       58166    58166              
  Branches     1494     1494              
==========================================
- Hits        53792    53772      -20     
- Misses       4336     4354      +18     
- Partials       38       40       +2     
Flag Coverage Δ
conformance 37.16% <0.00%> (+<0.01%) ⬆️
e2e 42.64% <0.00%> (+<0.01%) ⬆️
integration 22.08% <0.00%> (-0.05%) ⬇️
rust 53.54% <ø> (-0.14%) ⬇️
unit 91.83% <0.00%> (+<0.01%) ⬆️
unit-migrate 91.88% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-75e8253452ad36b558c3a94a384221af5214a1b8
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-75e8253452ad36b558c3a94a384221af5214a1b8

Afterwards, run the upgrade commands from the latest release notes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant