!130 同步安全编码到商分

Merge pull request !130 from zylworkhard1/OpenHarmony-5.0.1-Release
This commit is contained in:
openharmony_ci 2024-12-04 01:54:15 +00:00 committed by Gitee
commit df1f29c2e8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -143,7 +143,13 @@ bool VerifyTask::HandleFailureClientError(std::string verifyTime, int verifyCnt)
APP_DOMAIN_VERIFY_HILOGD(APP_DOMAIN_VERIFY_MODULE_EXTENSION, "called");
if (!verifyTime.empty()) {
int64_t currTs = GetSecondsSince1970ToNow();
int64_t lastTs = static_cast<int64_t>(std::stoll(verifyTime));
int64_t lastTs{};
try {
lastTs = static_cast<int64_t>(std::stoll(verifyTime));
} catch (...) {
APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_MODULE_EXTENSION, "get verifyTime error");
return false;
}
int64_t duration = currTs - lastTs;
int64_t currRetryDuration = CalcRetryDuration(verifyCnt);
if (duration <= currRetryDuration) {