Very special request...

Issue #679 resolved
Foddy created an issue

Hi,

for some reasons we have a lot of users who are struggling with the admin log in to set up their vacation messages. When they try to login to their accounts, they always append a space and get the notice that this is not a valid email. I don’t know if this is a cultural thing here or something that people just do for any reasons…

Cloud you trim the white spaces in the account email, so we finally can breathe again and don’t have to answer a lot of phone calls like “My account is not working!”… 😛

Thank you!

Comments (5)

  1. SH repo owner

    Text fields should be trimmed by default. Are you sure that this is the problem?

    curl 'https://demo.poste.io/admin/login-check' --data '_username=admin%40poste.io&_password=admin'
    ...Redirecting to http://demo.poste.io/admin/ (OK)
    
    curl 'https://demo.poste.io/admin/login-check' --data '_username=%20admin%40poste.io%20&_password=admin'
    ...Redirecting to http://demo.poste.io/admin/ (OK)
    
    curl 'https://demo.poste.io/admin/login-check' --data '_username=%20admin%40poste.io%20&_password=invalid'
    ...Redirecting to http://demo.poste.io/admin/login (invalid auth)
    
    curl 'https://demo.poste.io/admin/login-check' --data '_username=%20admin%40poste.io%20&_password=%20admin'
    ...Redirecting to http://demo.poste.io/admin/login (invalid auth)
    

    Problem can be with spaces at password (last example).

    Or you mean spaces in the email address itself? Like “john doe @email.com”?

  2. Foddy reporter

    Thank you for your fast reply. I mean the web interface for the admin login. It’s more a frontend HTML5 email validation thing that happens here.

    They type in something like this: “my.example@email.com “ – append a white space after the email. So they get the HTML5 email validation error when trying to log in.

    I think it could be “fixed” by trimming the mail right before the log in logic begins in the JS, so the validation doesn’t output any errors because of this (I can’t understand why they still do this…) error… 😑

  3. Log in to comment