Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a session checking bug #54

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Fix a session checking bug #54

merged 1 commit into from
Jan 20, 2025

Conversation

mtlynch
Copy link
Contributor

@mtlynch mtlynch commented Jan 19, 2025

Resolves #53

This fixes a bug I accidentally introduced by misunderstanding the echo session package. I thought that calling session.Get would return an error if no session existed for the session token valule. It seems that instead, if a session doesn't exist, session.Get creates one on-demand.

To fix this, we have to check the IsNew field of the session to see if calling session.Get created this session on-demand or if this was a session that was previously created in the Create function.

I introduced this bug in #43.

Resolves 0x2E#53

This fixes a bug I accidentally introduced by misunderstanding the echo session package. I thought that calling session.Get would return an error if no session existed for the session token valule. It seems that instead, if a session doesn't exist, session.Get creates one on-demand.

To fix this, we have to check the IsNew field of the session to see if calling session.Get created this session on-demand or if this was a session that was previously created in the Create function.

I introduced this bug in 0x2E#43.
@0x2E
Copy link
Owner

0x2E commented Jan 20, 2025

Thanks! I didn't know that either, as my old implementation was checking the session value.

@0x2E 0x2E merged commit c9102cf into 0x2E:main Jan 20, 2025
1 check 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.

[BUG] WebUI is not password-protectd
2 participants