Medium — lets users create accounts with whitespace in their username, which is almost never valid downstream (login, URLs, Keycloak), and produces confusing availability checks.
The username form control in the Basic Info step only validates required, minLength(5), and maxLength(50). There is no pattern constraint, so a new user can type a username containing spaces (e.g. john doe) and the form still considers it valid.
To make matters worse, the availability check calls checkUsernameAvailable(username.trim()), so the value sent to the backend is trimmed while the value stored on the form still contains the spaces — the displayed check result can disagree with what is actually submitted.
Steps to reproduce
Open the "Join SpikerSoft" registration flow.
In the Basic Info step, type a username that contains a space (e.g. john doe).
Observe the field is accepted as valid and you can proceed.
Expected
Usernames must not contain spaces (or other whitespace). Invalid usernames should show a clear validation error and block proceeding to the next step.
i18n: registration.basicInfo.username* keys in assets/i18n/en.json / es.json.
## Severity
Medium — lets users create accounts with whitespace in their username, which is almost never valid downstream (login, URLs, Keycloak), and produces confusing availability checks.
## Area
Registration stepper — Basic Info step ("Join SpikerSoft" flow), username field.
## Bug
The username form control in the Basic Info step only validates `required`, `minLength(5)`, and `maxLength(50)`. There is no pattern constraint, so a new user can type a username containing spaces (e.g. `john doe`) and the form still considers it valid.
To make matters worse, the availability check calls `checkUsernameAvailable(username.trim())`, so the value sent to the backend is trimmed while the value stored on the form still contains the spaces — the displayed check result can disagree with what is actually submitted.
### Steps to reproduce
1. Open the "Join SpikerSoft" registration flow.
2. In the Basic Info step, type a username that contains a space (e.g. `john doe`).
3. Observe the field is accepted as valid and you can proceed.
### Expected
Usernames must not contain spaces (or other whitespace). Invalid usernames should show a clear validation error and block proceeding to the next step.
## Pointers
- `spikersoft-angular/projects/spikersoft/src/app/_components/registration-stepper/basic-info-step.ts` — username `FormControl` validators.
- `spikersoft-angular/projects/spikersoft/src/app/_components/registration-stepper/basic-info-step.html` — username `mat-error` messages.
- i18n: `registration.basicInfo.username*` keys in `assets/i18n/en.json` / `es.json`.
spikerj
added the bug label 2026-06-25 16:16:58 +00:00
Resolved in spikersoft-angular PR #76 (merged to master). Added a pattern validator (^[a-zA-Z0-9._-]+$) to the username control so spaces (and other disallowed characters) are rejected, with a matching translated error message in EN/ES. Closing.
Resolved in spikersoft-angular PR #76 (merged to `master`). Added a `pattern` validator (`^[a-zA-Z0-9._-]+$`) to the username control so spaces (and other disallowed characters) are rejected, with a matching translated error message in EN/ES. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity
Medium — lets users create accounts with whitespace in their username, which is almost never valid downstream (login, URLs, Keycloak), and produces confusing availability checks.
Area
Registration stepper — Basic Info step ("Join SpikerSoft" flow), username field.
Bug
The username form control in the Basic Info step only validates
required,minLength(5), andmaxLength(50). There is no pattern constraint, so a new user can type a username containing spaces (e.g.john doe) and the form still considers it valid.To make matters worse, the availability check calls
checkUsernameAvailable(username.trim()), so the value sent to the backend is trimmed while the value stored on the form still contains the spaces — the displayed check result can disagree with what is actually submitted.Steps to reproduce
john doe).Expected
Usernames must not contain spaces (or other whitespace). Invalid usernames should show a clear validation error and block proceeding to the next step.
Pointers
spikersoft-angular/projects/spikersoft/src/app/_components/registration-stepper/basic-info-step.ts— usernameFormControlvalidators.spikersoft-angular/projects/spikersoft/src/app/_components/registration-stepper/basic-info-step.html— usernamemat-errormessages.registration.basicInfo.username*keys inassets/i18n/en.json/es.json.Resolved in spikersoft-angular PR #76 (merged to
master). Added apatternvalidator (^[a-zA-Z0-9._-]+$) to the username control so spaces (and other disallowed characters) are rejected, with a matching translated error message in EN/ES. Closing.