Skip to content

web: fix file upload form (cherry-pick #18808 to version-2025.12)#18884

Merged
rissson merged 1 commit intoversion-2025.12from
cherry-pick/18808-to-version-2025.12
Dec 17, 2025
Merged

web: fix file upload form (cherry-pick #18808 to version-2025.12)#18884
rissson merged 1 commit intoversion-2025.12from
cherry-pick/18808-to-version-2025.12

Conversation

@authentik-automation
Copy link
Contributor

Cherry-pick of #18808 to version-2025.12 branch.

Original PR: #18808
Original Author: @dominic-r
Cherry-picked commit: eef8e57

* web: fix file upload form name mismatch and modal submit promise handling

Fixes the following error:

FileUploadForm.ts:74  POST http://authentik.localhost:9000/api/v3/admin/file/ 405 (Method Not Allowed)
(anonymous) @ fetch.ts:81
fetchApi @ runtime.ts:206
await in fetchApi
request @ runtime.ts:136
await in request
adminFileCreateRaw @ AdminApi.ts:191
adminFileCreate @ AdminApi.ts:206
send @ FileUploadForm.ts:74
submit @ Form.ts:363
(anonymous) @ ModalForm.ts:54
handleEvent @ lit-html.ts:2109
n @ helpers.ts:117Understand this error
Form.ts:403 authentik/forms: API rejected the form submission due to an invalid field that doesn't appear to be in the form. This is likely a bug in authentik. {detail: 'Response returned an error code'}
(anonymous) @ console.ts:39
(anonymous) @ Form.ts:403
Promise.catch
submit @ Form.ts:376
(anonymous) @ ModalForm.ts:54
handleEvent @ lit-html.ts:2109
n @ helpers.ts:117Understand this error
runtime.ts:140 Uncaught (in promise) ResponseError: Response returned an error code
    at mR.request (runtime.ts:140:15)
    at async mR.adminFileCreateRaw (AdminApi.ts:191:26)
    at async mR.adminFileCreate (AdminApi.ts:206:9)

- align file upload rename field with api name so validation errors map correctly
-improve custom filename extension logic to avoid double or incorrect  extensions
- prevent unhandled promise rejections from modal submit click handler and show  missing-form errors to users

* rev

* wip

* Update ModalForm.ts

Signed-off-by: Dominic R <dominic@sdko.org>

* scope better

* fix what it validates against

---------

Signed-off-by: Dominic R <dominic@sdko.org>
@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 2d80481
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6941a7115a8d440008fba0c9
😎 Deploy Preview https://deploy-preview-18884--authentik-integrations.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.

@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 2d80481
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6941a711b8734f0008aef96f
😎 Deploy Preview https://deploy-preview-18884--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

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.22%. Comparing base (5a54e1d) to head (2d80481).
⚠️ Report is 3 commits behind head on version-2025.12.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           version-2025.12   #18884      +/-   ##
===================================================
+ Coverage            92.97%   93.22%   +0.24%     
===================================================
  Files                  946      946              
  Lines                51949    51949              
===================================================
+ Hits                 48302    48431     +129     
+ Misses                3647     3518     -129     
Flag Coverage Δ
e2e 44.75% <ø> (+0.65%) ⬆️
integration 23.26% <ø> (+<0.01%) ⬆️
unit 91.49% <ø> (+<0.01%) ⬆️
unit-migrate 91.53% <ø> (+<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
Contributor

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-2d804815868bfe07d5b00344922c917c3be99692
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-2d804815868bfe07d5b00344922c917c3be99692

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

@dominic-r dominic-r enabled auto-merge (squash) December 17, 2025 01:09
@rissson rissson disabled auto-merge December 17, 2025 13:02
@rissson rissson merged commit cbc00a5 into version-2025.12 Dec 17, 2025
161 of 172 checks passed
@rissson rissson deleted the cherry-pick/18808-to-version-2025.12 branch December 17, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants