Uh oh, somebody's not following best practices, that's a paddlin
Uh oh, somebody's not following best practices, that's a paddlin
Uh oh, somebody's not following best practices, that's a paddlin
I don't even know how the fuck this happens.
Enter password
Incorrect
Enter password again, carefully to make sure no typos
Incorrect
Change password to the one you remember it to be
"New password can't be the same as old password"
😬
Shit sometimes gives me this while using a password manager! The saved password is correct. Even the change password thing says it should be correct. Still tells me it's wrong trying to use it.
That just means they're forcing everyone to change their passwords but they don't want to come out and tell you about it.
If you're lucky, some overzealous sysadmin is just trying to enforce regular password updates on his users, and makes them expire every once in a while.
More likely, there was a breach of some sort that they want to keep on the hush.
It's also possible there's a hidden max password size somewhere, like some fields only counting the first x characters of the password but it's inconsistent across different forms.
but they don't want to come out and tell you about it.
It also doesn't require a code change to continue blaming the user when you invalidate all current passwords.
It's a couple database queries to move all current passwords to old passwords, and change current (hashed) password for everyone to "deadbeef". Nobody can guess a value that adds to their salt and hashes to "deadbeef", and you get this behavior.
One time, I was trying to recover an old email address from a local ISP domain. They had changed the pw length requirements a few years earlier.
Well, my current password was not long enough, but some idiot designer put the password requirements on the Old Password field as well. I was not allowed to update my password to meet the new requirement because the old password did not meet the new requirements. Morons.
Shit sometimes gives me this while using a password manager! The saved password is correct. Even the change password thing says it should be correct. Still tells me it's wrong trying to use it.
I had this exact issue with an Instagram account. You'd expect a social media site with 2 billion monthly active users to do better but nope
What gets me is the "password is too similar to old password".
How do they know? Are they storing them in plain text? I would imagine the hash would change drastically even if I change a single character, no?
I can imagine one legitimate case: when you create a password, they save the hash for the full password as well as the hash for the password without the last character. So if you attempt to change only the last character, they can detect it. They'd need to salt the two separately though.
In theory, they could do the same for every character, but they'd have to save 20+ combinations for that (plus all the salt), so I doubt anyone is doing that.
The strongly recommended hashing algorithms are slow on purpose, and often use up a lot of RAM, too. Multiplying the number of hashes you would need would multiply CPU/memory load for every new password.
No need to store it, you can do the opposite, create 20 variations of the new password, hash them, check if any match with the old password.
Edit : nevermind, it would only work if they added data instead of editing it.
Yeah, but 99.999...% of the time, they're just storing plaintext.
Cryptographic hashes don't work like that. One of the defined properties of a strong cryptographic hash is that changing even one bit on the input results in about 50% of the bits of the output getting flipped in a non predictable way. There's simply no way to tell from looking at two cryptographic hashes how similar their inputs are. If there were, that would weaken the security significantly.
Usually you have to enter your old password on the same form in order to set a new one.
Alternatively they could run a bunch of common substitutions on the new password, hash, and check if anything matches the old hash.
I mean they could technically check common password modifications and test all of those hashes against your old hash to see, if they're storing plaintext and you should delete your account immediately.
My guess is the latter is correct
Storing in plaintext? That's a paddlin'.
Not salting your hashes? That's a paddlin'.
Sending hashes to the front-end? That's a paddlin'.
You gotta salt yer hash, that's how you bring out the flavour!
It pisses me off that so many companies store a database of X number of your old passwords in the first place. Like, fuck off twerps, I probably still use those old passwords for at least 20 other logins. When your shitty database is compromised I now have to worry about all of them.
The old passwords don't have to be stored in plain text. They can still be hashed and salted.
In theory, yes. But unintentional bugs and security flaws exist (cf sites like have I been pwned), and by storing old passwords next to new ones increases the impact of such bugs and flaws significantly, precisely because folks use the same password for different services. Of course people shouldn't do that, but they do, and as a dev you should be mindful of that.
You're like, so close.
Don't reuse passwords between different services, or after a password reset. You're aware of exactly why that's a bad practice (a compromise of any one of those services, or an old database of those services will expose that password), so why knowingly bear that risk?
Last time I had to implement a feature like that, I stored a substring of the old password's hash. If one User in a million gets a False quotation Mark same Passwort quotation Mark message, I can live with it.
I probably still use those old passwords for at least 20 other logins.
Right at the top of the list of things not to do with a password.
Someone with your Amazon account might assume you use Facebook, Youtube, Steam, and every bank around your location(they know). There's 2factor, but not everywhere
I mean, that's true if you reuse your passwords instead of using a password manager that can generate random gibberish... Which is itself a very poor habit exactly because of this very fact?
Even assuming a company follows best practices (a bold assumption that is wholly inconsistent with reality) there's ALWAYS a possibility of a breach - and it's not if, it's only when.
So, everyone should be using a password manager by default.
I like to use keepassXC personally because it's fully under my control. I don't really care for ones that are hosted by 3rd parties because that introduces more risk if they get beached, but for many people that's fine; it's more convenient for the user. To me it's important enough that I manage it all locally.
Password managers are your friend 🙏
I probably still use those old passwords for at least 20 other logins.
My soul cries for you.
They could still be doing the validation server side even if you didn't hit submit, like when you leave the text box.
Nah it pulls your plain text password in after you enter your email to compare it to 🙂
This thread is just a series of people who think they understand.
Thinking you understand when you do not is the real cyber security threat.
This is a password reset form. This requires the user having successfully authenticated or gone through a password recovery form. The best practices in this instance are not the same as the best practices for a login form.
This form can be used to brute force or dictionary guess passwords and infer what they are without a limitation on login attempts. Even if the password has already been invalidated on that service, finding a collision on this service gives you a password that might work on other services for the same email address/username
And waiting for a form submit changes that in what way that cannot also be done on a debounce?
It would still take significant time, but it's still a vulnerability, especially as technology evolves. You're right that best practices are different for a reset form, but there are some things that are common (like don't do hashes in the front end).
Can someone explain why this would be bad?
Edit: ah i got it, before i submit as in while you are typing it in it shows you a message. I thought it was just one of those warnings where it goes "has to have capital letters, at least 8 characters, etc".
Because in order to know that the password is the same before submission, it has to store it in plaintext (or I guess it could hash every input and compare it immediately but no way that's happening).
Idk how you came to these conclusions. They might be storing it plain text and comparing directly, sure. Any website might be. But there is nothing about this that indicates that they are actually doing that for sure. They could absolutely just be comparing the hash after each input. The problem that for sure is happening is that they have sent the hash tot the front end, i.e. in the web page elements that the user can inspect, and they are verifying your current/used password(s) on the fly without even a submit attempt counting against them. All of which means a password farmer could just harvest the hashes for every username they try, and/or use bots to put in a username/password, hit "forgot password", and then brute force the stored current/password(s) without any red flags being raised.
We're all assuming there isn't a "current password" field right next to "new password" on the reset form. Most of them do, though there are arguments that they shouldn't.
I mean I guess in theory they could be sending the password to the backend and validating it against your hash? In reality I doubt anybody would do that tho as it's a huge load on the server
Well when the website is so helpful and give you instant feedback on the correctness of your password... Then it would do that to hackers as well.
A password reset occurs within a state that has some form of authorization.
Definitely a thing, usually a debounce meaning it waits half a second after the last key stroke to perform validation.
You could use logic to only send it after x amount of seconds without changes, waiting for the specified minimum length, etc.
With the right restrictions, it really wouldn't be that much different load profile wise to submitting it upon button press.
There's a high probability that it's sending the hash (or even the password 😵💫) to the browser and comparing it though which is bad practice. Hell, just having a hash with no salt is bad practice, and sending the salt to the frontend as well would be even arguably worse.
Not even remotely involved with opsec, but sending the password from the client to the server doesnt seem that crazy. It opens you up to people skimning your plaintext password if your connection is not secure, but by that same logic if your connection isnt secure then they can skim your hash. Unless the security on the site is good im sure there is a way to skip the encoding process and log in directly using the hash, so its a relatively small improvement to send the hash rather than plaintext, no? The much bigger issue would be if the server validated it as plaintext, because that would mean the server stores it as plaintext. But if the encoding is done server side, then that would make it significantly harder to crack the hash algorithm.
Im sure im making a mistake with my reasoning here, can you explain it to me?
Edit: ah, i see. I misread your comment.
The hash or a checksum can be sent to the page to be checked by the same function running in your browser that is checking if the new password has special characters etc.
That would be an extremely bad idea tho, because it would allow a malicious attacker to
Username/password validation should happen entirely server-side, with as little information as possible provided to the client
Seems like a great way for me to harvest a bunch of hashes to pull down to my GPU rig and crack offline.
Name names
Is it good to reveal weak systems? Like just naming names here is that effective to prevent people from being compromised more or less than they already are?
I want to know if its something I use, but i also dont want to contribute to outing weak systems without also informing the system people first to let them know.
I'm genuinely curious, i dont actually know just seems risky to me to create a hitlist of soft targets
I'm struggling to figure out what the problem is, aside from UX annoyance (like the IDE panicking before you close a brace or sth). Eventually whatever you end up typing is being sent to the server anyway, and if that's not inherently problematic, what's the problem with intermediates being sent? Is the problem XHR requests on events other than clicking? Why?
It is implied that it was made using comparing to a plaintext password sent back from server to the user's browser to compare.
The other day I used a website and they didn't let me pick a password.
They sent me a very secure random one via email 💀 in the year 2025, this still happens.
There's really nothing wrong with that, it's a sort of half-baked 1.5FA, I would hope/assume you had to immediately change your password after.
It's just 1 factor, as they are using "something you have," i.e. your email account, to authenticate you initially. Anyone with access to the account would have the password, so it can't count as a unique factor.
Australian Army still does this.
This is asinine and anyone responding that this is normal is asinine as well. You can email a link to reset the password but if you're sending a plaintext password, even with the intention of changing it immediately, you're a fucking idiot.
Yeah, I'm shocked with the other responses to my comment...
Some banks do this and then ask you to change it later.
it's ok if you need to immediately change it