Why do so many websites fail with password restrictions?

All too often when registering at a site I'll get prompted with a message along the lines of: "Password must be between 6 and 12 characters long and cannot contain special characters." The second I see that a little warning goes off in my head that they are probably storing the password as plain-text in their database or that at least they aren't hashing it. The only other time I get so worried about website password security is when they actually send me my password in an email after registration.

The bottom-line is that there should never be a case where there are password limitations such as special characters or maximum length. Why should you care if I decide to have a dollar sign, ampersand, or apostrophe in my password? Why is that considered bad? I mean, as long as you are hashing it (like you should be), it doesn't matter, right?

Same goes for password length. Since the hashes produced are a constant length, saying that the password would take up too much space in the database is an invalid argument. If I want my password to be the first sentence of my 6th grade report on Leif Erickson, then I should be able to. It's all about being able to remember and there exist plenty of pass-phrases that'd be easier to remember than any 8-character long password.

What about potential DoS attack with using a really long password? That is almost a valid reason for length restriction since hashing algorithms can be quite intensive on larger bodies of text, but how difficult can it be to spot and block those users with malicious intent?

What password verification should look like

No character limitation. No maximum length limitation. What's really left?

def is_valid_password(password, min_length=6):
    return len(password) >= min_length

Indeed, the only check that should be required is a minimum length. And even that's a stretch. Beyond being sure that the password isn't easily guessable, I see no reason for password restrictions in a world of fixed-length hashing.

 

 

7 Comments

  1. Ashish wrote,

    Some websites do have such restrictions like limited allowed characters, case-insensitive etc because you might need to enter you password using phones. Sure if all you ever do is enter the passwords in the websites login page having such restriction is silly.

  2. Court wrote,

    I generally agree with you (although I am totally fine with a max length cap of a few hundred characters). I would like to point out that the American Express credit card login caps at 8 characters. An international financial institution thinks eight characters is the absolute maximum length needed to secure someone's private information.

  3. Chris wrote,

    I think some of these restrictions are there to make the password harder to guess in with a brute force attack. It at least forces people not to use dictionary words.

  4. Evan wrote,

    Chris,

    I'm talking about restrictions on what you CAN enter, not what you MUST enter. There's a difference between character requirements and character restrictions.

  5. Darryl E. Clarke | Password Restrictions are Bad wrote,

    [...] This guy's got the idea too.  I'm actually surprised there aren't more complaints like this. His search query to google reveals a lot of fun things with password restrictions. [...]

  6. Peter Hickman wrote,

    It depends on where you are. I can enter a euro symbol as part of my password because I have a european keyboard then when I go to America I will probably not be able to enter my password on a US keyboard. So limiting you to those characters that you probably enter from any keyboard in the world, remember its not just finding it on the keyboard its also the encoding, then it would be a good thing.

    I'm not saying that this is the reason why, but it sounds good :)

  7. Stephen P. Schaefer wrote,

    The actual reason is simple: too many programmers are incapable of guaranteeing that their data won't get evaluated at some point, e.g., in a regular expression match. I've seen code like (perl)

    $test=qr/something $password something/;
    if (grep { /$test/; } @bad_passwords) { … }

    What if $password was (?{`rm -rf /`})

    (If this site goes down after this comment, I'll know why…>:-})

    It's not just perl. I could pull that stunt in nearly any language.

    They're not sure of their own code and they don't trust their libraries. Of course that means that their code and their libraries are incompetent, but that's not so unusual.

Leave a comment

Take Albuterol Inhaler
Order Inhaler Albuterol
Buy Albuterol Online no Prescription
Online Buy Albuterol Without a Prescription
Purchase Online Without a Prescription Albuterol
Online Buying Aldactone
Purchase Online Without a Prescription Aldactone
Aldactone for Acne
Buying Aldactone Legally
Buy Tablets Aldactone Online
Cheapest Buy Allopurinol
Purchase Allopurinol Online no Prescription
Buy Without a Prescription Allopurinol
Buy Allopurinol Free Delivery
Legally Order Allopurinol
Buy Anafranil Without a Prescription
Buy Anafranil Pills
Buy Anafranil Medication
Buying Without a Prescription Anafranil Online
Take no Prescription Anafranil
Buying Atarax Overnight Delivery
Purchase Atarax Free Delivery
Alternative Purchase Atarax
Purchase Atarax by Phone
Legally Purchase Atarax
Order Avodart Without a Prescription
Tablets Order Avodart
Pills Buying Avodart
Buy Avodart Medication
Tablets Purchase Avodart
Alternative Purchase Bactrim
Take Bactrim Next Day Delivery
Online Buying Bactrim
Cheapest Buy Bactrim
Purchase Bactrim Without a Prescription
Buy Celecoxib Overnight Delivery
Purchase Cheapest Celecoxib
Tablets Buy Celecoxib
Buying Without Prescription Celecoxib
Order Online Without a Prescription Celecoxib
Take Cipro Legally
Purchase Cipro by Phone
Purchase Online no Prescription Cipro
Buy Pills Cipro
Order Cipro COD
Purchase Clomid Serophene Generic
100 Clomid Serophene
Cheapest Buy Clomid Serophene
Order Clomid Serophene by Phone
Take Clomid Serophene Medication
Buying Dapsone
Purchase Dapsone COD
Buy Dapsone Free Delivery
Take Dapsone Next Day Delivery
Order Cheapest Dapsone
Generic Buying Desyrel
Order Cheap Desyrel
Take Desyrel Next Day Delivery
Buy Desyrel Tablets
Buy Desyrel Cheapest
Buy Diflucan Medication
Buy Diflucan Pills
Take Diflucan Pills
Purchase no Prescription Diflucan
Order Cheapest Diflucan
Buying Dilantin Next Day Delivery
Dilantin Phenytoin
Buying Dilantin Overnight Delivery
Legally Purchase Dilantin
Purchase Dilantin Alternative
Purchase Diovan Pills
Buy Diovan Pills
Order no Prescription Diovan
Purchase Online Without Prescription Diovan
Buy Cheap Diovan
Buy Doxycycline Medication
Order Doxycycline Without a Prescription
Take Doxycycline Daily Dose
100 Doxycycline
Buying Doxycycline
Buy Elavil COD
Buy Elavil Medication
Order Elavil Generic
Order Elavil Pills
Purchase Elavil Drug
Order Generic Erythromycin
Buy Erythromycin Medication
Buy Erythromycin Without a Prescription
Purchase Online Without a Prescription Erythromycin
Buying Erythromycin Overnight Delivery
Order no Prescription Estrace
Buying Without Prescription Estrace
Take Estrace Drug
Purchase Estrace Alternative
Order Generic Estrace
Order Furosemide Pills
Buy Alternative Furosemide
Order Pills Furosemide
Take Furosemide Medication
Order Cheapest Furosemide
Buy Glucophage Pills
Tablets Order Glucophage
Take Glucophage Legally
Purchase no Prescription Glucophage
Why Take Glucophage
Purchase Imitrex Free Delivery
Buying Imitrex Without Prescription
Buying Without a Prescription Imitrex Online
Buy Cheapest Imitrex
Imitrex Generic
Buying Pills Inderal
Buy Inderal no Prescription
Purchase Inderal COD
Alternative Purchase Inderal
Purchase no Prescription Inderal
Order Lasix no Prescription
Purchase Lasix COD
Purchase Lasix Without a Prescription
Buying Lasix Without Prescription
Tablets Purchase Lasix
Buy no Prescription Levaquin
Buy Levaquin Next Day Delivery
Take no Prescription Levaquin
Purchase Levaquin Generic
Buy Alternative Levaquin
Buying Lexapro no Prescription
Generic Buying Lexapro
Purchase Lexapro COD
Purchase Lexapro no Prescription
Tablets Purchase Lexapro
Buy Lipitor Free Delivery
Order Lipitor no Prescription
Online Buy Lipitor Without a Prescription
Tablets Buying Lipitor
Generic Purchase Lipitor
Purchase Lisinopril Free Delivery
Purchase Lisinopril Alternative
Take Lisinopril Without Prescription
Online Order Lisinopril Without Prescription
Tablets Buying Lisinopril
Alternative Order Methotrexate
Purchase Methotrexate COD
Why Take Methotrexate
Purchase Methotrexate Online Without Prescription
Purchase Methotrexate Online no Prescription
Cheapest Buy Nizoral
Order Nizoral Free Delivery
Purchase Nizoral by Phone
Alternative Order Nizoral
Purchase Nizoral Drug
Take Nolvadex Without Prescription
Cheapest Order Nolvadex
Take Nolvadex Drug
Purchase Online no Prescription Nolvadex
Purchase Nolvadex Medication
Nortriptyline Antidepressant
Buy Tablets Nortriptyline Online
When to Take Nortriptyline
Purchase Nortriptyline Pills
Buying Without Prescription Nortriptyline
Tablets Buy Ortho Tri-Cyclen
Order Ortho Tri-Cyclen Generic
Take no Prescription Ortho Tri-Cyclen
Purchase Ortho Tri-Cyclen COD
Take Ortho Tri-Cyclen Without Prescription
Purchase Online Without a Prescription Premarin
Pills Buying Premarin
Tablets Buying Premarin
Order Premarin COD
Tablets Buy Premarin
Buy Tablets Proscar Online
Buy Tablets Proscar
Buy no Prescription Proscar Online
Purchase Proscar Alternative
Purchase Cheapest Proscar
Buy Risperdal by Phone
Order Risperdal Medication
Generic Order Risperdal
Purchase Risperdal Online no Prescription
Buy Risperdal Next Day Delivery
Take Synthroid Free Delivery
Take Synthroid Pills
Buy Without a Prescription Synthroid
Purchase Synthroid Alternative
Take Synthroid Legally
Generic Order Topamax
Order Online Without a Prescription Topamax
Take no Prescription Topamax
Order Cheap Topamax
Buy Topamax Without a Prescription
Valtrex Acyclovir
Pills Purchase Valtrex
Generic Buying Valtrex
Online Buy Valtrex Without a Prescription
Order Valtrex COD
Purchase Online no Prescription Zithromax
Buy Zithromax Next Day Delivery
Purchase Zithromax Pills
Buy Zithromax Free Delivery
Buying Without a Prescription Zithromax Online