Skip to content

Fix secret loading for socket message verification#1004

Merged
tudddorrr merged 1 commit into
developfrom
fix-verified-socket-messages
Jul 10, 2026
Merged

Fix secret loading for socket message verification#1004
tudddorrr merged 1 commit into
developfrom
fix-verified-socket-messages

Conversation

@tudddorrr

@tudddorrr tudddorrr commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Socket request signing support

  • socketLogger.ts: Updated logRequest to strip a leading signature line (separated by newline) before parsing the JSON body when conn.verifyRequests is enabled, so the logger correctly extracts the request name from signed messages.
  • socketRouter.ts: Added eager population of game.apiSecret during socket connection validation, ensuring the API secret is available for verifying request signatures at the routing level.

@tudddorrr tudddorrr added the fix This pull request contains a fix label Jul 10, 2026
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.25%. Comparing base (3387ef9) to head (7613f8d).

Files with missing lines Patch % Lines
src/socket/messages/socketLogger.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1004      +/-   ##
===========================================
- Coverage    98.27%   98.25%   -0.02%     
===========================================
  Files          427      427              
  Lines         7110     7111       +1     
  Branches       964      965       +1     
===========================================
  Hits          6987     6987              
  Misses          50       50              
- Partials        73       74       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tudddorrr
tudddorrr force-pushed the fix-verified-socket-messages branch from 6421066 to d349e3e Compare July 10, 2026 21:20
@tudddorrr
tudddorrr force-pushed the fix-verified-socket-messages branch from d349e3e to 7613f8d Compare July 10, 2026 22:17
@tudddorrr
tudddorrr merged commit b27e0b3 into develop Jul 10, 2026
8 of 10 checks passed
@tudddorrr
tudddorrr deleted the fix-verified-socket-messages branch July 10, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix This pull request contains a fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant