!8234 增加锁屏上拉起应用安全校验

Merge pull request !8234 from 谭子渊/master
This commit is contained in:
openharmony_ci 2024-08-19 08:42:27 +00:00 committed by Gitee
commit ea66d03026
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 2 deletions

View File

@ -322,7 +322,8 @@ void JsRootSceneSession::VerifyCallerToken(SessionInfo& info)
{
auto callerSession = SceneSessionManager::GetInstance().GetSceneSession(info.callerPersistentId_);
if (callerSession != nullptr) {
bool isCalledRightlyByCallerId = info.callerToken_ == callerSession->GetAbilityToken();
bool isCalledRightlyByCallerId = (info.callerToken_ == callerSession->GetAbilityToken()) &&
info.bundleName_ == "";
TLOGI(WmsLogTag::WMS_SCB,
"root isCalledRightlyByCallerId result is: %{public}d", isCalledRightlyByCallerId);
info.isCalledRightlyByCallerId_ = isCalledRightlyByCallerId;

View File

@ -2288,7 +2288,8 @@ void JsSceneSession::PendingSessionActivation(SessionInfo& info)
auto callerSession = SceneSessionManager::GetInstance().GetSceneSession(info.callerPersistentId_);
if (callerSession != nullptr) {
bool isCalledRightlyByCallerId = info.callerToken_ == callerSession->GetAbilityToken();
bool isCalledRightlyByCallerId = (info.callerToken_ == callerSession->GetAbilityToken()) &&
info.bundleName_ == "";
TLOGI(WmsLogTag::WMS_SCB,
"isCalledRightlyByCallerId result is: %{public}d", isCalledRightlyByCallerId);
info.isCalledRightlyByCallerId_ = isCalledRightlyByCallerId;