Skip to content

Conversation

@xecdev
Copy link
Collaborator

@xecdev xecdev commented May 29, 2025

Users on dynamic IPs are being logged out each time their public address changes (e.g. home ISPs, cellular, or rotating VPN endpoints). This PR relaxes our fingerprint check in PayButton_State::fingerprint() so that, instead of using the full client IP, we only use the first two octets for IPv4 (e.g. 203.0) or the first two hextets for IPv6 (e.g. 2001:0db8). This will help solve the frequent logout issue and will help the plugin remember a logged-in user's session for a week. I have fully tested this new feature for IPV4.

Test plan:

  • Install and activate the plugin
  • Use a VPN (which gives you dynamic IP addresses for same location) or release and renew IP through CMD.
  • Login via Cashtab
  • Change your IP's last one or two octets, and verify that you're still logged in

@xecdev xecdev requested a review from Klakurka May 29, 2025 08:45
@xecdev xecdev self-assigned this May 29, 2025
@xecdev xecdev added the enhancement (behind the scenes) Stuff that users won't see label May 29, 2025
Copy link
Member

@Klakurka Klakurka left a comment

Choose a reason for hiding this comment

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

We can try this but much of the time they'll be getting a new ip address that's totally different which tells obviously doesn't address.

@Klakurka Klakurka merged commit 21d6e32 into master May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement (behind the scenes) Stuff that users won't see

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants