Skip to content

fix: handle empty pwcc container password and case-tolerant pwcc hashes - #38

Open
moobyfr wants to merge 1 commit into
Jvr2022:v1from
moobyfr:v1
Open

moobyfr wants to merge 1 commit into
Jvr2022:v1from
moobyfr:v1

Conversation

@moobyfr

@moobyfr moobyfr commented Oct 15, 2026

Copy link
Copy Markdown

Problem

Client-config (pwcc) files can be stored with an empty container password (SEB stores unprotected client configs as pwcc with Password="", IsHash=true). The app forced a prompt and hashed the input, so these files failed to load. Also, for password-protected pwcc, SEB hashes to lowercase hex; some tools emit uppercase.

Fix

In src/settings/password_container.cpp::unwrapSebContainer():

  1. For pwcc, try the empty password first (no prompt). If it decrypts, proceed.
  2. For user-supplied pwcc passwords, try lowercase SHA-256 hex first (SEB standard), then fall back to uppercase for compatibility. pswd behavior unchanged.

Verification

  • SebClientSettings-*.seb and examples/maconf.seb now load without requiring the admin/file password (container is empty).
  • Truly password-protected pwcc files still require the correct password; wrong passwords are rejected.
  • No regressions observed.

This matches SEB's behavior (old Config Tool tries empty for pwcc; new SEB stores client configs with empty password).

…+uppercase pwcc hashes

Client-config (pwcc) files stored by SEB can be encrypted with an
empty container password. Also SEB uses SHA-256 hex lowercase for
pwcc hashing but some tools produce uppercase.

Try empty password first for pwcc (no prompt); for user-supplied pwcc
passwords, try lowercase (SEB standard) then uppercase as fallback.

Fixes loading of:
- SebClientSettings-*.seb (official client settings)
- examples/maconf.seb
- preserve compatibility for truly password-protected files.
@moobyfr
moobyfr requested a review from Jvr2022 as a code owner October 15, 2026 06:42
@Jvr2022

Jvr2022 commented Oct 15, 2026

Copy link
Copy Markdown
Owner

I might just take this change and do the change local myself because I currently got alot of code locally that will conflict this pr.

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.

2 participants