Skip to content

fix login link#137

Merged
foltik merged 1 commit intomainfrom
sam/login-redirect-fix
Mar 30, 2026
Merged

fix login link#137
foltik merged 1 commit intomainfrom
sam/login-redirect-fix

Conversation

@swlody
Copy link
Copy Markdown
Collaborator

@swlody swlody commented Mar 16, 2026

When the login form is submitted without a redirect value, the hidden input still renders with value="", so the form POST includes redirect= which deserializes as Some("") instead of None. This causes the login link to be built with &redirect= param, which breaks the login link in the email.

lsd/src/app/auth.rs

Lines 92 to 95 in fe15290

let login_url = match form.redirect {
Some(redirect) => format!("{base_url}/login?token={login_token}&redirect={redirect}"),
None => format!("{base_url}/login?token={login_token}"),
};

@swlody swlody requested a review from foltik March 16, 2026 20:53
@foltik
Copy link
Copy Markdown
Owner

foltik commented Mar 25, 2026

tyty! will take a look and merge once I’m back in town next week

@foltik foltik merged commit 1f77693 into main Mar 30, 2026
5 of 6 checks passed
@foltik foltik deleted the sam/login-redirect-fix branch March 30, 2026 21:11
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