[1] https://arstechnica.com/gadgets/2021/03/rookie-coding-mistak...
Thanks, I guess. Whoops, more noise.
[0] of course, there is a chance that you just discovered a hash collision, but that is exceedingly unlikely. It also means that Gab would have accepted 'password' as the password for that user anyway, even if the string they typed in was 'warblerer' (which it would also accept).
I don't think password policy enforcement can be reasonably done after the hashing. You cannot apply password rules as information about length and specific characters is lost; applying a blacklist would also be exceedingly expensive as you'd need to hash each word in your list with the selected salt.
Password policy enforcement is done on the plain text password, during initial account creation or during a password change workflow. Then, the password and salt are hashed and the result and the salt are stored.
When the user tries to login they then provide the plaintext password; the salt is retrieved, it is added to the password, the result is hashed, and the hash is compared to the stored hash.
Since the space of all passwords is larger than the space of all hashes, there is a theoretical possibility that the user can provide a different password than the original plaintext, and this new plaintext + the salt happens to have the same hash, so the login system (which has no idea what the original plaintext was) will accept it.
With any halfway decent cryptographic hashing function this is less likely than winning every lottery in the world at once with the same ticket.
This is obviously moot, as a collision is exceedingly unlikely in this case, but still.
https://haveibeenpwned.com/API/v3#SearchingPwnedPasswordsByR...
The only thing that works are better passwords. But in theory Argon2 should be a bit better than bcrypt.