Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libsignon] Treat empty ACL as synonym for "*". Contributes to JB#27876
- Loading branch information
Chris Adams
committed
Dec 10, 2019
1 parent
cc8a208
commit e71d603
Showing
10 changed files
with
62 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
rpm/0009-Treat-empty-ACL-as-synonym-for-.-Contributes-to-JB-2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 313e047da4e704725ae4ca07acfa96c266de3c48 Mon Sep 17 00:00:00 2001 | ||
From: Chris Adams <chris.adams@jollamobile.com> | ||
Date: Mon, 22 Jul 2019 14:00:51 +1000 | ||
Subject: [PATCH 9/9] Treat empty ACL as synonym for "*". Contributes to | ||
JB#27876 | ||
|
||
Prior to 03dd20ef043bd5c1035387998c59312ccc704a59 the ACL was | ||
bypassed if the identity had no owner. | ||
With that commit applied, the ACL is enforced even if it had not | ||
previously been set, making all existing identities inaccessible. | ||
|
||
This commit ensures that if the ACL is empty, we treat this as a | ||
synonym for "*" ACL, allowing the identity to be accessed. | ||
--- | ||
src/signond/accesscontrolmanagerhelper.cpp | 5 +---- | ||
1 file changed, 1 insertion(+), 4 deletions(-) | ||
|
||
diff --git a/src/signond/accesscontrolmanagerhelper.cpp b/src/signond/accesscontrolmanagerhelper.cpp | ||
index 931efc3..40ef357 100644 | ||
--- a/src/signond/accesscontrolmanagerhelper.cpp | ||
+++ b/src/signond/accesscontrolmanagerhelper.cpp | ||
@@ -91,10 +91,7 @@ bool AccessControlManagerHelper::isPeerAllowedToUseIdentity( | ||
if (ownership == ApplicationIsOwner) | ||
return true; | ||
|
||
- if (acl.isEmpty()) | ||
- return false; | ||
- | ||
- if (acl.contains(QLatin1String("*"))) | ||
+ if (acl.contains(QLatin1String("*")) || acl.isEmpty()) | ||
return true; | ||
|
||
return peerHasOneOfAccesses(peerConnection, peerMessage, acl); | ||
-- | ||
2.17.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters