Skip to content

Comments

Implement handling of new cookie received from SU platform#722

Merged
MattyTheHacker merged 6 commits intomainfrom
cookie-expire-handling
Feb 20, 2026
Merged

Implement handling of new cookie received from SU platform#722
MattyTheHacker merged 6 commits intomainfrom
cookie-expire-handling

Conversation

@MattyTheHacker
Copy link
Member

Note this will need the cookie checking task (or some other query) to run more often than the cookie expires. For MSL this appears to be about 15 minutes

@MattyTheHacker MattyTheHacker self-assigned this Feb 20, 2026
Copilot AI review requested due to automatic review settings February 20, 2026 00:40
@MattyTheHacker MattyTheHacker added the enhancement New feature or request label Feb 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements automatic handling of cookie updates from the SU platform. The MSL platform returns updated authentication cookies in HTTP responses that expire approximately every 15 minutes. The PR refactors cookie management to detect and store these updated cookies, and consolidates duplicate HTTP session handling code.

Changes:

  • Introduced fetch_url_content_with_session function to handle HTTP requests with automatic cookie update detection and storage
  • Refactored fetch_community_group_members_list to use the new shared session handling function
  • Removed duplicate HTTP session code from CheckSUPlatformAuthorisationBaseCog class

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
utils/msl/memberships.py Added fetch_url_content_with_session function to detect and update cookies from server responses; refactored fetch_community_group_members_list to use new function
utils/msl/init.py Exported new fetch_url_content_with_session function
cogs/check_su_platform_authorisation.py Removed duplicate HTTP session handling code; replaced with calls to shared fetch_url_content_with_session function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MattyTheHacker MattyTheHacker enabled auto-merge (squash) February 20, 2026 00:50
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Matty Widdop <18513864+MattyTheHacker@users.noreply.github.com>
@MattyTheHacker MattyTheHacker merged commit e7cb8ec into main Feb 20, 2026
12 checks passed
@MattyTheHacker MattyTheHacker deleted the cookie-expire-handling branch February 20, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants