Skip to main content
replaced http://security.stackexchange.com/ with https://security.stackexchange.com/
Source Link

Create clause guards:

if (empty($pass)) {
    return "<br />Password field is empty";
}
if (!ctype_alnum($pass)) {
    return "<br />Password has special character";
}

However, this all seems like a lot for an average user. If the user wants a weak password, let them have it. Just make sure you're doing all you can to protect them in your database.

I read that somewhere, let me see if I can find the source. Oh, and why would you not let them have special characters in their password?

Found somethingFound something sort of like what I was talking about

Create clause guards:

if (empty($pass)) {
    return "<br />Password field is empty";
}
if (!ctype_alnum($pass)) {
    return "<br />Password has special character";
}

However, this all seems like a lot for an average user. If the user wants a weak password, let them have it. Just make sure you're doing all you can to protect them in your database.

I read that somewhere, let me see if I can find the source. Oh, and why would you not let them have special characters in their password?

Found something sort of like what I was talking about

Create clause guards:

if (empty($pass)) {
    return "<br />Password field is empty";
}
if (!ctype_alnum($pass)) {
    return "<br />Password has special character";
}

However, this all seems like a lot for an average user. If the user wants a weak password, let them have it. Just make sure you're doing all you can to protect them in your database.

I read that somewhere, let me see if I can find the source. Oh, and why would you not let them have special characters in their password?

Found something sort of like what I was talking about

added 118 characters in body
Source Link
Alex L
  • 5.8k
  • 2
  • 26
  • 69

Create clause guards:

if (empty($pass)) {
    return "<br />Password field is empty";
}
if (!ctype_alnum($pass)) {
    return "<br />Password has special character";
}

However, this all seems like a lot for an average user. If the user wants a weak password, let them have it. Just make sure you're doing all you can to protect them in your database.

I read that somewhere, let me see if I can find the source. Oh, and why would you not let them have special characters in their password?

Found something sort of like what I was talking about

Create clause guards:

if (empty($pass)) {
    return "<br />Password field is empty";
}
if (!ctype_alnum($pass)) {
    return "<br />Password has special character";
}

However, this all seems like a lot for an average user. If the user wants a weak password, let them have it. Just make sure you're doing all you can to protect them in your database.

I read that somewhere, let me see if I can find the source. Oh, and why would you not let them have special characters in their password?

Create clause guards:

if (empty($pass)) {
    return "<br />Password field is empty";
}
if (!ctype_alnum($pass)) {
    return "<br />Password has special character";
}

However, this all seems like a lot for an average user. If the user wants a weak password, let them have it. Just make sure you're doing all you can to protect them in your database.

I read that somewhere, let me see if I can find the source. Oh, and why would you not let them have special characters in their password?

Found something sort of like what I was talking about

Source Link
Alex L
  • 5.8k
  • 2
  • 26
  • 69

Create clause guards:

if (empty($pass)) {
    return "<br />Password field is empty";
}
if (!ctype_alnum($pass)) {
    return "<br />Password has special character";
}

However, this all seems like a lot for an average user. If the user wants a weak password, let them have it. Just make sure you're doing all you can to protect them in your database.

I read that somewhere, let me see if I can find the source. Oh, and why would you not let them have special characters in their password?