-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
core: handle deserialization errors from FileField migration #19067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
after migration 0054 changed icon fields from Django FileField to a TextField based custom FileField, old sessions which had serialized Source/Application model instances fail to deserialize. The old FieldFile descriptors try to access field.storage which no longer exists. We can't edit that migration since it has already been ran by many/ So, you add AttributeError and TypeError to exception handling in SessionStore.decode() to return an empty session instead of crashing with 500.
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19067 +/- ##
==========================================
- Coverage 93.37% 93.32% -0.05%
==========================================
Files 949 949
Lines 52247 52247
==========================================
- Hits 48786 48760 -26
- Misses 3461 3487 +26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-36c966cba406d96cd2cd9d9bf7336718a6026e2e
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your 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-36c966cba406d96cd2cd9d9bf7336718a6026e2eAfterwards, run the upgrade commands from the latest release notes. |
after migration 0054 changed icon fields from Django FileField to a TextField based custom FileField, old sessions which had serialized Source/Application model instances fail to deserialize. The old FieldFile descriptors try to access field.storage which no longer exists. We can't edit that migration since it has already been ran by many/ So, you add AttributeError and TypeError to exception handling in SessionStore.decode() to return an empty session instead of crashing with 500.
|
🍒 Cherry-pick to |
* main: (149 commits) lib: update error logging (#18628) core, web: update translations (#19179) web: bump @formatjs/intl-listformat from 8.1.0 to 8.1.1 in /web (#19182) ci: bump getsentry/action-release from 3.4.0 to 3.5.0 (#19183) web: bump knip from 5.78.0 to 5.79.0 in /web (#19181) lifecycle: fix migration conn_options for psycopg connection (#19134) website/docs: remove duplicates in slo docs (#19170) web/admin: adjust sync threshold, add tooltip (#19131) web: Fix user library colors, modal z-indexes, table progress bars (#19152) web: fix slug auto-updating when editing existing applications (#19169) core: handle deserialization errors from FileField migration (#19067) stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#19137) website/integrations: vaultwarden: add custom email scope (#19160) ci: bump int128/docker-manifest-create-action from 2.10.0 to 2.12.0 (#19138) core, web: update translations (#19135) web: bump globals from 16.5.0 to 17.0.0 in /web (#19154) web/user: fix consent delete form missing details (#19147) web: Token Form Fixes (#19121) website/docs: fix build (#19148) website/docs: endpoint agent release notes (#19042) ...
* main: (43 commits) web/maintenance: no missing element type definitions (#18950) core: add prettier failure on duplicate group names (#18941) website/integrations: make grafana terraform section expand (#19192) lib: update error logging (#18628) core, web: update translations (#19179) web: bump @formatjs/intl-listformat from 8.1.0 to 8.1.1 in /web (#19182) ci: bump getsentry/action-release from 3.4.0 to 3.5.0 (#19183) web: bump knip from 5.78.0 to 5.79.0 in /web (#19181) lifecycle: fix migration conn_options for psycopg connection (#19134) website/docs: remove duplicates in slo docs (#19170) web/admin: adjust sync threshold, add tooltip (#19131) web: Fix user library colors, modal z-indexes, table progress bars (#19152) web: fix slug auto-updating when editing existing applications (#19169) core: handle deserialization errors from FileField migration (#19067) stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#19137) website/integrations: vaultwarden: add custom email scope (#19160) ci: bump int128/docker-manifest-create-action from 2.10.0 to 2.12.0 (#19138) core, web: update translations (#19135) web: bump globals from 16.5.0 to 17.0.0 in /web (#19154) web/user: fix consent delete form missing details (#19147) ...
…pick #19067 to version-2025.12) (#19168) Co-authored-by: Dominic R <[email protected]>
* main: (38 commits) web/maintenance: no missing element type definitions (#18950) core: add prettier failure on duplicate group names (#18941) website/integrations: make grafana terraform section expand (#19192) lib: update error logging (#18628) core, web: update translations (#19179) web: bump @formatjs/intl-listformat from 8.1.0 to 8.1.1 in /web (#19182) ci: bump getsentry/action-release from 3.4.0 to 3.5.0 (#19183) web: bump knip from 5.78.0 to 5.79.0 in /web (#19181) lifecycle: fix migration conn_options for psycopg connection (#19134) website/docs: remove duplicates in slo docs (#19170) web/admin: adjust sync threshold, add tooltip (#19131) web: Fix user library colors, modal z-indexes, table progress bars (#19152) web: fix slug auto-updating when editing existing applications (#19169) core: handle deserialization errors from FileField migration (#19067) stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#19137) website/integrations: vaultwarden: add custom email scope (#19160) ci: bump int128/docker-manifest-create-action from 2.10.0 to 2.12.0 (#19138) core, web: update translations (#19135) web: bump globals from 16.5.0 to 17.0.0 in /web (#19154) web/user: fix consent delete form missing details (#19147) ...
* main: (24 commits) web/maintenance: no missing element type definitions (#18950) core: add prettier failure on duplicate group names (#18941) website/integrations: make grafana terraform section expand (#19192) lib: update error logging (#18628) core, web: update translations (#19179) web: bump @formatjs/intl-listformat from 8.1.0 to 8.1.1 in /web (#19182) ci: bump getsentry/action-release from 3.4.0 to 3.5.0 (#19183) web: bump knip from 5.78.0 to 5.79.0 in /web (#19181) lifecycle: fix migration conn_options for psycopg connection (#19134) website/docs: remove duplicates in slo docs (#19170) web/admin: adjust sync threshold, add tooltip (#19131) web: Fix user library colors, modal z-indexes, table progress bars (#19152) web: fix slug auto-updating when editing existing applications (#19169) core: handle deserialization errors from FileField migration (#19067) stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#19137) website/integrations: vaultwarden: add custom email scope (#19160) ci: bump int128/docker-manifest-create-action from 2.10.0 to 2.12.0 (#19138) core, web: update translations (#19135) web: bump globals from 16.5.0 to 17.0.0 in /web (#19154) web/user: fix consent delete form missing details (#19147) ...
after migration 0054 changed icon fields from Django FileField to a TextField based custom FileField, old sessions which had serialized Source/Application model instances fail to deserialize.
The old FieldFile descriptors try to access field.storage which no longer exists.
We can't edit that migration since it has already been ran by many/
So, you add AttributeError and TypeError to exception handling in SessionStore.decode() to return an empty session instead of crashing with 500.
Details
REPLACE ME
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)