* stages/user_write: refuse to write id/pk claims onto the user model
When an enrollment or source flow maps IdP-supplied attributes onto the
User model, update_user walks each key and, if the user already has an
attribute by that name, calls setattr(user, key, value) unconditionally.
"id" is always present on the User model (it is the Django PK), so a
SAML assertion that ships an "id" claim, e.g. a hex string from
mocksaml, was written straight into the PK field. Django then rejected
the save:
ValueError: Field 'id' expected a number but got '<hex>'.
The log surfaced as "Failed to save user" and the enrollment flow
silently failed for every incoming user.
Treat "id" and "pk" the same way the existing "groups" entry is
treated: add them to disallowed_user_attributes so the walker logs and
skips them. IdP attributes can still be stored on user.attributes via
the dotted/underscored forms (e.g. attributes.id), which go through
write_attribute and land in the JSONField safely.
Added a regression test covering both id and pk in the prompt context.
Fixes#21580
Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
* fix lint
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
---------
Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: SAY-5 <SAY-5@users.noreply.github.com>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
translate: Translate django.po in pl_PL [Manual Sync]
63% of minimum 60% translated source file: 'django.po'
on 'pl_PL'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate django.po in it_IT [Manual Sync]
83% of minimum 60% translated source file: 'django.po'
on 'it_IT'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate en.xlf in it_IT [Manual Sync]
72% of minimum 60% translated source file: 'en.xlf'
on 'it_IT'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate django.po in pt_PT [Manual Sync]
84% of minimum 60% translated source file: 'django.po'
on 'pt_PT'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* fix interpolation
Signed-off-by: Simonyi Gergő <28359278+gergosimonyi@users.noreply.github.com>
---------
Signed-off-by: Simonyi Gergő <28359278+gergosimonyi@users.noreply.github.com>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Simonyi Gergő <28359278+gergosimonyi@users.noreply.github.com>
* translate: Translate en.xlf in cs_CZ [Manual Sync]
82% of minimum 60% translated source file: 'en.xlf'
on 'cs_CZ'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate django.po in cs_CZ [Manual Sync]
82% of minimum 60% translated source file: 'django.po'
on 'cs_CZ'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate en.xlf in tr_TR [Manual Sync]
63% of minimum 60% translated source file: 'en.xlf'
on 'tr_TR'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate django.po in tr_TR [Manual Sync]
67% of minimum 60% translated source file: 'django.po'
on 'tr_TR'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate en.xlf in zh-Hans [Manual Sync]
94% of minimum 60% translated source file: 'en.xlf'
on 'zh-Hans'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate django.po in zh-Hans [Manual Sync]
97% of minimum 60% translated source file: 'django.po'
on 'zh-Hans'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate en.xlf in ru_RU [Manual Sync]
63% of minimum 60% translated source file: 'en.xlf'
on 'ru_RU'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate django.po in ru_RU [Manual Sync]
66% of minimum 60% translated source file: 'django.po'
on 'ru_RU'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate en.xlf in ja_JP [Manual Sync]
83% of minimum 60% translated source file: 'en.xlf'
on 'ja_JP'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate django.po in ja_JP [Manual Sync]
90% of minimum 60% translated source file: 'django.po'
on 'ja_JP'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate en.xlf in de_DE [Manual Sync]
77% of minimum 60% translated source file: 'en.xlf'
on 'de_DE'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate django.po in de_DE [Manual Sync]
86% of minimum 60% translated source file: 'django.po'
on 'de_DE'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate en.xlf in es_ES [Manual Sync]
74% of minimum 60% translated source file: 'en.xlf'
on 'es_ES'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate django.po in es_ES [Manual Sync]
82% of minimum 60% translated source file: 'django.po'
on 'es_ES'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate django.po in fr_FR [Manual Sync]
95% of minimum 60% translated source file: 'django.po'
on 'fr_FR'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate en.xlf in fr_FR [Manual Sync]
91% of minimum 60% translated source file: 'en.xlf'
on 'fr_FR'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate django.po in fi_FI [Manual Sync]
93% of minimum 60% translated source file: 'django.po'
on 'fi_FI'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate en.xlf in fi_FI [Manual Sync]
85% of minimum 60% translated source file: 'en.xlf'
on 'fi_FI'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* translate: Translate django.po in pt_BR [Manual Sync]
96% of minimum 60% translated source file: 'django.po'
on 'pt_BR'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
* translate: Translate en.xlf in pt_BR [Manual Sync]
92% of minimum 60% translated source file: 'en.xlf'
on 'pt_BR'.
Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>