Skip to content

S7+F1+F6+S6+B4: password reset + health endpoint + CSRF + entry-point unification#340

Merged
detain merged 1 commit into
masterfrom
fix/server-phase3-5-finish
Jun 29, 2026
Merged

S7+F1+F6+S6+B4: password reset + health endpoint + CSRF + entry-point unification#340
detain merged 1 commit into
masterfrom
fix/server-phase3-5-finish

Conversation

@detain

@detain detain commented Jun 29, 2026

Copy link
Copy Markdown
Owner

S7+F1 — Password reset: stop plaintext, force-change + expiry

  • resetPassword() now returns success message (no plaintext password)
  • Generates 32-byte CSPRN reset token, Argon2ID-hashed at rest, 15-min expiry
  • Sets must_change_password=1 flag
  • login()/refreshToken() throw PasswordChangeRequiredException when flag set
  • New migrations for logout_all_devices_at + password_reset_fields

F6 — Health endpoint /admin/health/jobs

  • Reports stuck transcode job counts + oldest age + last reaper run
  • Reports scan job stats
  • Builds on P3+B1 reaper infrastructure

S6+B4+C3+C6 — CSRF protection for cookie-auth + unified entry-point

  • New RequestAuthenticator class — shared cookie+bearer auth + Origin/Referer validation
  • Used by both HttpHandler and public/index.php (same auth behavior)
  • Cookie-auth POST/PUT/DELETE/PATCH requires valid Origin/Referer header
  • AuthMiddleware/AdminMiddleware docstrings corrected

Verification

  • ./vendor/bin/phpstan analyze --level=9 — no errors ✅
  • ./vendor/bin/phpcs PSR-12 — no errors ✅

S7: resetPassword() returns success message, no plaintext password
Stores Argon2ID-hashed token with 15-min expiry; sets must_change_password=1
login/refresh throw PasswordChangeRequiredException when flag set
New migrations: logout_all_devices_at, password_reset_fields
New: RequestAuthenticator (shared cookie+bearer auth + CSRF check)

S6+B4+C3+C6: CSRF protection for cookie-auth + unified entry-point
RequestAuthenticator handles cookie+bearer auth; validates Origin/Referer for
cookie-auth POST/PUT/DELETE/PATCH; used by both HttpHandler and public/index.php
Docstrings corrected on AuthMiddleware and AdminMiddleware

F6: health endpoint /admin/health/jobs
Reports transcode/scan job counts + oldest age + last reaper run time
Builds on P3+B1 reaper infrastructure
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 5 high · 24 medium · 17 minor

Alerts:
⚠ 46 issues (≤ 0 issues of at least minor severity)

Results:
46 new issues

Category Results
Compatibility 1 medium
4 high
BestPractice 7 medium
Documentation 2 minor
ErrorProne 12 medium
Security 1 high
CodeStyle 15 minor
Complexity 4 medium

View in Codacy

🟢 Metrics 61 complexity · 0 duplication

Metric Results
Complexity 61
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@detain detain merged commit a7ff806 into master Jun 29, 2026
11 of 14 checks passed
@detain detain deleted the fix/server-phase3-5-finish branch June 29, 2026 18:05
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