mirror of
https://gitee.com/openharmony/useriam_user_auth_framework
synced 2024-11-23 15:49:52 +00:00
fix : fix authType verification
Signed-off-by: abonadon_hk <huangkang22@huawei.com> Change-Id: Ic65c7340cece8621023769826a96d6ce13f89505
This commit is contained in:
parent
e15568fe1a
commit
07bd89982c
@ -567,13 +567,14 @@ int32_t UserAuthService::CheckAuthWidgetParam(
|
||||
IAM_LOGE("CheckValidSolution fail %{public}d", ret);
|
||||
return ret;
|
||||
}
|
||||
static const size_t validSizeTwo = 2;
|
||||
static const size_t validType0 = 0;
|
||||
static const size_t validType1 = 1;
|
||||
if (((validType.size() == validSizeTwo) &&
|
||||
(validType[validType0] == AuthType::FACE) && (validType[validType1] == AuthType::FINGERPRINT)) ||
|
||||
((validType.size() == validSizeTwo) &&
|
||||
(validType[validType0] == AuthType::FINGERPRINT) && (validType[validType1] == AuthType::FACE))) {
|
||||
static const size_t authTypeTwo = 2;
|
||||
static const size_t authType0 = 0;
|
||||
static const size_t authType1 = 1;
|
||||
std::vector<AuthType> authType = authParam.authType;
|
||||
if (((authType.size() == authTypeTwo) &&
|
||||
(authType[authType0] == AuthType::FACE) && (authType[authType1] == AuthType::FINGERPRINT)) ||
|
||||
((authType.size() == authTypeTwo) &&
|
||||
(authType[authType0] == AuthType::FINGERPRINT) && (authType[authType1] == AuthType::FACE))) {
|
||||
IAM_LOGE("only face and finger not support");
|
||||
return INVALID_PARAMETERS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user