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

Remove the last username from the session after use #2399

Merged
merged 1 commit into from Oct 6, 2020

Conversation

ausi
Copy link
Member

@ausi ausi commented Oct 5, 2020

Q A
Fixed issues Fixes #1627

See #1627 (comment)

@ausi ausi added the bug label Oct 5, 2020
@ausi ausi added this to the 4.9 milestone Oct 5, 2020
@ausi ausi self-assigned this Oct 5, 2020
@leofeyer
Copy link
Member

leofeyer commented Oct 6, 2020

I think the purpose of the "last username" feature is that when you log out and later go back to the login module, your username is already filled in. IIRC, this no longer works after merging this PR, does it?

@asaage
Copy link

asaage commented Oct 6, 2020

I think the purpose of the "last username" feature is that when you log out and later go back to the login module, your username is already filled in. IIRC, this no longer works after merging this PR, does it?

to mitigate that i'd recommend autocomplete attributes on the inputs anyway:

<input type="text" name="username" id="username" class="text" value="" required="" autocomplete="username">
<input type="password" name="password" id="password" class="text password" value="" required="" autocomplete="current-password">

This is something chrome always complains about and i added that to the login template.
Similar autocomplete values can be added to the personal-data module formfields.

@ausi
Copy link
Member Author

ausi commented Oct 6, 2020

I think the purpose of the "last username" feature is that when you log out and later go back to the login module, your username is already filled in.

This does not work currently and I don’t think it is expected to work as Symfony removes the “last username” from the session as soon as your login was successful. See #1627 (comment)

As far as I understand this feature, the “last username” is stored in the session so that if you mistype your password you don’t have to reenter your username for the second attempt.

@fritzmg
Copy link
Contributor

fritzmg commented Oct 6, 2020

As far as I understand this feature, the “last username” is stored in the session so that if you mistype your password you don’t have to reenter your username for the second attempt.

That's what I thought as well 👍 I've never seen the other use-case work, nor would I find it useful. In fact I would consider that a security issue. If I log out of a website on a public machine, I don't want my username to linger around.

to mitigate that i'd recommend autocomplete attributes on the inputs anyway:

Oh yes, and please let's do it for the Install Tool as well. Browsers always confuse the input fields of the create admin user form 🙃

@leofeyer leofeyer merged commit 2afe13c into contao:4.9 Oct 6, 2020
@leofeyer
Copy link
Member

leofeyer commented Oct 6, 2020

Thank you @ausi.

@leofeyer
Copy link
Member

leofeyer commented Oct 6, 2020

to mitigate that i'd recommend autocomplete attributes on the inputs anyway:

@asaage Will you create a PR for that?

@leofeyer leofeyer changed the title Remove last username from session after use Remove the last username from the session after use Oct 6, 2020
@asaage
Copy link

asaage commented Oct 15, 2020

@asaage Will you create a PR for that?

didn't know that there was already a ticket for this (#1669) 🤷‍♂️

@leofeyer
Copy link
Member

Never mind, I did it myself: #2432

@ausi ausi deleted the fix/clear-username-from-session branch December 3, 2021 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants