[Bug] Согласовать password policy (ASCII, 8–72) в backend, OpenAPI и frontend #60
Closed
opened 2026-10-11 21:43:36 +03:00 by codex-bot
·
1 comment
No Branch/Tag Specified
Labels
Clear labels
Kind/Dependencies
Kind/Investigation
Kind/Process
Kind/Refactor
audit/2026-10-11
kind/investigation
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Dependency update or dependency-management work
Research or decision required before implementation
Developer workflow, CI/CD, tooling, or process improvement
Internal code or configuration restructuring without new product behavior
Technical Audit Remediation — 2026-10-11
Нужна проверка evidence до решения; runtime-дефект не утверждается
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Milestone
No items
No Milestone
Technical Audit Remediation — 2026-10-11
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: WealthLedger/backend#60
Reference in New Issue
Block a user
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.
Problem
FE/spec и backend расходятся: FE проверяет 12–72 UTF-8 bytes, backend
MinLength(12)считает characters и проверяет bytes только в максимуме. Шесть кириллических букв проходят UI и отвергаются API. Existing ASCII DTO test не отличает эти policy. OpenAPI обещаетminLength: 12/maxLength: 72в characters.Решение owner (2026-10-16): новая password policy
Заменяет byte-policy из исходной формулировки.
a secure password.Expected Behavior
Register принимает и отвергает одни и те же raw passwords в FE schema и backend DTO по политике выше. Published OpenAPI описывает политику корректно (
pattern,minLength: 8,maxLength: 72корректны для ASCII).Evidence
Audit date
2026-10-11; 03, 08. IDs DRY-001, RISK-007, TQ-007 (password arm), TA-F12. Backend revision0ad84ff4f0b4712abc7e69dc299856f14af6eadd; frontendc8821200ce699dab1ce65360d1968d5877a2e78b; Confidence High; Verification status static.Affected: auth.dto.ts:43–74; frontend auth.schema.ts:36–43; snapshot:5246–5250; backend common/dto-validation.spec.ts:13–30.
Scope
In scope
Password validation в backend DTO (register и login), Swagger metadata, explicit consumer artifact delivery, frontend schema/AuthForm, meaningful boundary table.
Out of scope
Требования сложности (классы символов), normalization/trim, stored hash rewrite, shared cross-repo validator package, миграция существующих пользователей с не-ASCII паролями.
Proposed Approach
Register DTO: ASCII-pattern + длина 8–72. Login DTO: строка не длиннее 72 bytes. Swagger:
pattern/minLength/maxLengthдля register. Frontend: схема register по той же policy, login без charset/минимума.Acceptance Criteria
Verification
Existing DTO/auth HTTP и frontend schema/AuthForm cases; runtime OpenAPI parity и consumer openapi:check при delivery. Relevant final gates.
Dependencies
Нет. Token-role/cookie regression T09 независима от DTO fix.
Traceability
Campaign WealthLedger/main#23 . Findings DRY-001, RISK-007, TQ-007, TA-F12. Repository WealthLedger/backend; T08.
[Bug] Согласовать password validation в UTF-8 bytes и HTTP metadatato [Bug] Согласовать password policy (ASCII, 8–72) в backend, OpenAPI и frontendРешено. Влиты в
develop: backend#109, frontend#89, specs#47, docs#47. AC подтверждены тестами (границы 7/8/72/73, кириллица, emoji, tab/LF/DEL, raw whitespace, login со старым паролем, 400/VALIDATION_ERROR с pointer#/password) и OpenAPI parity;npm run verifyв backend и frontend прошёл.Принятые допущения: пробел разрешён; login проверяет только непустой пароль до 72 байт.