Skip to content

Dashboard: sign in with an API key or user name of any length - #302

Merged
msx752 merged 2 commits into
developfrom
fix/dashboard-login-length-rules
Nov 26, 2026
Merged

msx752 merged 2 commits into
developfrom
fix/dashboard-login-length-rules

Conversation

@msx752

@msx752 msx752 commented Nov 26, 2026

Copy link
Copy Markdown
Owner

The sign-in page refused an API key shorter than 10 characters and a user name shorter than 3, and kept its button disabled. The server takes any length (WithApiKey, WithBasicAuth) and compares the credentials as they are, so a dashboard configured with a short key or user name could not be opened at all.

Change

  • The form refuses only an empty field. The rules move to utilities/loginRules.ts and Login.vue uses them.
  • The messages for empty fields are unchanged.

What does not change

  • The server, the API, the stored data; basic and host sign-in apart from the removed length rules.

Testing

  • loginRules.test.ts: short keys and user names are accepted, empty fields refused. Mutants that put back the 10-character key rule (in the rule or in the button check) or the 3-character user name rule each fail the full dashboard suite (338 tests).
  • In a browser (sample app with WithApiKey("short1")): before, "API key must be at least 10 characters" with the button disabled, while /api/auth/validate accepts the key; after, the button is enabled and sign-in lands on the dashboard.
  • vue-tsc --build clean, no new lint messages, every .NET test project passes, the scenario solution builds.
  • An independent review of the diff found no other change in the sign-in flow.

The sign-in page refused an API key shorter than 10 characters and a
user name shorter than 3, and kept its button disabled. The server takes
any length (WithApiKey, WithBasicAuth) and compares the credentials as
they are, so a dashboard configured with a short key or user name could
not be opened at all.

The form now refuses only an empty field. The rules move to
utilities/loginRules.ts, with tests.
@msx752
msx752 merged commit 95d99eb into develop Nov 26, 2026
6 checks passed
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.

1 participant