Skip to content

fix: handle suffixed gateway_sessionid in session expiry tracking - #132

Merged
fullsushidev merged 1 commit into
mainfrom
fix-session-expires-suffixed-cookie
Apr 23, 2026
Merged

fullsushidev merged 1 commit into
mainfrom
fix-session-expires-suffixed-cookie

Conversation

@fullsushidev

Copy link
Copy Markdown
Member

Summary

  • Commit 6d6def8 (Support custom gateway_sessionid (#131)) fixed gw_auth_client.get_cookies_from_response to use startswith("gateway_sessionid") for suffixed cookie names in 2.7+
  • But GalaxyClient.check_or_refresh_gateway_session still uses an exact match (cookie.name != "gateway_sessionid"), so session_expires is never set on suffixed deployments
  • This causes every _http() call to re-authenticate, overwriting any intentionally corrupted headers (breaking Gateway auth tests)
  • One-line fix: use startswith to match the same pattern as parse_custom_gateway_sessionid

Test plan

  • Run Galaxy-NG Gateway auth tests (test_gateway_auth_admin_gateway_sessionid, test_gateway_token_auth, test_gateway_create_ns_csrftoken) against a 2.7 deployment with suffixed cookie
  • Verify session expiry tracking works (no unnecessary re-logins)

Fixes: AAP-66185

🤖 Generated with Claude Code

Commit 6d6def8 added startswith-based matching for the
gateway_sessionid cookie in gw_auth_client.get_cookies_from_response,
but missed the same hardcoded exact match in
GalaxyClient.check_or_refresh_gateway_session. This causes
session_expires to never be set on suffixed deployments (e.g.
gateway_sessionid44927), triggering a re-login on every HTTP
call and overwriting any intentionally corrupted test headers.

Fixes: AAP-66185

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ingrid Sena <10999758+fullsushidev@users.noreply.github.com>
@fullsushidev
fullsushidev merged commit 6e27678 into main Apr 23, 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.

2 participants