diff options
author | Pekka Pessi <Pekka.Pessi@nokia.com> | 2010-03-19 19:49:54 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-03-19 13:48:04 -0500 |
commit | 9a398a1087ebf3c327dcd3ed8191da33fc0d361b (patch) | |
tree | f0f23239935967d79922a3f0628fa5a4624d05d3 /src/call-meter.c | |
parent | c0c682d5c04f1e1b75c624e26c44c9f11e07b44b (diff) | |
download | ofono-9a398a1087ebf3c327dcd3ed8191da33fc0d361b.tar.bz2 |
Fix: Check password length based on its type
The different password types have different length requirements, so
update is_valid_pin to validate according to the password type being
validated (PIN / PUK / NET)
Diffstat (limited to 'src/call-meter.c')
-rw-r--r-- | src/call-meter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/call-meter.c b/src/call-meter.c index 2b1e6a50..335b33c7 100644 --- a/src/call-meter.c +++ b/src/call-meter.c @@ -546,7 +546,7 @@ static DBusMessage *cm_set_property(DBusConnection *conn, DBusMessage *msg, dbus_message_iter_get_basic(&iter, &passwd); - if (!is_valid_pin(passwd)) + if (!is_valid_pin(passwd, PIN_TYPE_PIN)) return __ofono_error_invalid_format(msg); for (property = cm_properties; property->name; property++) { @@ -618,7 +618,7 @@ static DBusMessage *cm_acm_reset(DBusConnection *conn, DBusMessage *msg, DBUS_TYPE_INVALID) == FALSE) return __ofono_error_invalid_args(msg); - if (!is_valid_pin(pin2)) + if (!is_valid_pin(pin2, PIN_TYPE_PIN)) return __ofono_error_invalid_format(msg); cm->pending = dbus_message_ref(msg); |