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

issue: Remove Old Login Code #6542

Merged
merged 1 commit into from May 30, 2023

Conversation

JediKev
Copy link
Contributor

@JediKev JediKev commented May 25, 2023

This removes old and tired code from the login pages where we throw Http::response(422); to "prevent browsers from suggesting saving the username and password". This is no longer the case as browsers no longer play by these rules. The only way to properly do this nowadays is to set an attribute on the form (or input) tag to disable autocomplete. We don't want to do this either as that would prevent password managers from autofilling the auth info.

Throwing a 422 code prevents some setups from accepting logins due to 4XX codes being error codes in nature. Removing this code seemingly has no negative impact whatsoever.

A short backstory, this was originally a 401 code to prevent browsers from suggesting saving the auth info. Later it was changed to a 422 code to make IE play nice.

This removes old and tired code from the login pages where we throw
`Http::response(422);` to "prevent browsers from suggesting saving the
username and password". This is no longer the case as browsers no longer
play by these rules. The only way to properly do this nowadays is to set
an attribute on the form tag to disable autocomplete. We don't want to
do this either as that would prevent password managers from autofilling
the auth info.

Throwing a 422 code prevents some setups from accepting logins due to
4XX codes being error codes in nature. Removing this code seemingly has
no negative impact whatsoever.

A short backstory, this was [originally a 401
code](osTicket@a99b9ce)
to prevent browsers from suggesting saving the auth info. Later it was
[changed to a 422
code](osTicket@772d5c5)
to make IE play nice.
@protich protich merged commit b7b31e7 into osTicket:develop May 30, 2023
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.

None yet

2 participants