Our company enforces the use of complex passwords. They must contain letters, numbers and symbols, have a minimal length and differ from the last x passwords. My password is no exception. But when I log-in from my mac I always get a ‘incorrect user name or password or username’ message.
I noticed some behavior on my mac that differs from my windows machine. When I type certain characters they light up in yellow.
Never thought about this, but what if this interferes with my password input.
My plan is to verify that the password I input is send to the server. For this I will use a local webpage. The html code for webpage I used is listed below.
<html> <body> Password <input type='password'/> Plaintext <input type='text'/> </body> </html>
On this webpage I input all ‘special’ characters into both the password and plaintext. After revealing them with the developer tools I noticed some characters weren’t there. The missing characters are listed below.
Character | Name |
---|---|
ˆ | Caret |
“ | Double Quote |
‘ | Single Quote |
˜ | Tilde |
` | Backtick |
This is actually a feature not a bug. When you type ^ the input waits for the next character. Is the next character the letter e the input is combined into ê. This is the case for all missing characters in the table above. But in a password box the input is ignored. To get the special character into a password box you’ll need to type the space directly after. The only feedback is that no asterisk is added on a special character.
Back to the different behavior on my mac and my windows machine. I remembered some issue with the keyboard input type on my windows machine. On my mac the input source is U.S. International – PC. After adding the US input source and switching to it the special characters are accepted in the password box. Problem solved!
It took me some time to figure this out. Now it sounds obvious, but it is frustrating when you don’t know why your password isn’t accepted.