Skip to content

core: error malformed hashed password hash on import#24120

Open
PeshekDotDev wants to merge 1 commit into
mainfrom
password-import-error-timing
Open

core: error malformed hashed password hash on import#24120
PeshekDotDev wants to merge 1 commit into
mainfrom
password-import-error-timing

Conversation

@PeshekDotDev

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Currently, if you import a hashed password (via .env like AUTHENTIK_BOOTSTRAP_PASSWORD_HASH: HASEDPASSWORDHERE, we do not validate the password isn't malformed until after it's already been imported.

Why is this change needed?

A user can put a malformed password hash, boot up authentik, and then their admin login flow can explode. The error message will not make it clear as to why. This makes it clear at server boot that the hashed password is malformed.

How was this tested?

Setting AUTHENTIK_BOOTSTRAP_PASSWORD_HASH: malformed before and after the changes

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@PeshekDotDev
PeshekDotDev requested a review from dominic-r July 16, 2026 14:42
@PeshekDotDev PeshekDotDev self-assigned this Jul 16, 2026
@PeshekDotDev
PeshekDotDev requested a review from a team as a code owner July 16, 2026 14:42
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 75cb663
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a58edcb6677e80008bf1db0
😎 Deploy Preview https://deploy-preview-24120--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.

@BeryJu BeryJu changed the title authentik/core: error malformed hashed passoword hash on import core: error malformed hashed passoword hash on import Jul 16, 2026
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.79%. Comparing base (e5f84e1) to head (75cb663).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24120      +/-   ##
==========================================
- Coverage   92.84%   92.79%   -0.05%     
==========================================
  Files        1056     1056              
  Lines       62719    62784      +65     
  Branches      424      424              
==========================================
+ Hits        58229    58261      +32     
- Misses       4490     4523      +33     
Flag Coverage Δ
conformance 35.54% <0.00%> (-0.03%) ⬇️
e2e 40.58% <0.00%> (-0.03%) ⬇️
integration 31.52% <0.00%> (-0.51%) ⬇️
rust 0.00% <ø> (ø)
unit 92.01% <100.00%> (+<0.01%) ⬆️
unit-migrate 92.02% <100.00%> (-0.01%) ⬇️

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

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

@PeshekDotDev PeshekDotDev added the backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 label Jul 16, 2026
@github-actions

Copy link
Copy Markdown
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-75cb663ff4120c5134dad29c1750484e4291eb81
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-75cb663ff4120c5134dad29c1750484e4291eb81

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

@PeshekDotDev PeshekDotDev changed the title core: error malformed hashed passoword hash on import core: error malformed hashed password hash on import Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant