sim: Make sure only PINs can be sent to EnterPin

This commit is contained in:
Denis Kenzior 2011-06-02 15:55:26 -05:00
parent ea07cbfa1b
commit 3c82e9b9cc
1 changed files with 3 additions and 0 deletions

View File

@ -806,6 +806,9 @@ static DBusMessage *sim_enter_pin(DBusConnection *conn, DBusMessage *msg,
if (type == OFONO_SIM_PASSWORD_NONE || type != sim->pin_type)
return __ofono_error_invalid_format(msg);
if (password_is_pin(type) == FALSE)
return __ofono_error_invalid_format(msg);
if (!__ofono_is_valid_sim_pin(pin, type))
return __ofono_error_invalid_format(msg);