aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-04-06 10:27:30 +0200
committerMario <mario@mariovavti.com>2019-04-06 10:27:30 +0200
commit4e12f86e909692e8aef203f2db001dcfa52410c9 (patch)
tree1094666c487453828fc1f4f0929091228138f025 /include
parent9d5f8883a7d7767b447771664209761f9e3ce66f (diff)
parent8700b87030927c96818579a1f7ba3add9e3e0992 (diff)
downloadvolse-hubzilla-4e12f86e909692e8aef203f2db001dcfa52410c9.tar.gz
volse-hubzilla-4e12f86e909692e8aef203f2db001dcfa52410c9.tar.bz2
volse-hubzilla-4e12f86e909692e8aef203f2db001dcfa52410c9.zip
Merge branch 'dev' into 'dev'
security: perms_pending not evaluated correctly See merge request hubzilla/core!1583
Diffstat (limited to 'include')
-rw-r--r--include/permissions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/permissions.php b/include/permissions.php
index 115d96eca..1dcd6accb 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -192,7 +192,7 @@ function get_all_perms($uid, $observer_xchan, $check_siteblock = true, $default_
// They are in your address book, but haven't been approved
- if($channel_perm & PERMS_PENDING) {
+ if($channel_perm & PERMS_PENDING && (! intval($x[0]['abook_pseudo']))) {
$ret[$perm_name] = true;
continue;
}
@@ -316,6 +316,7 @@ function perm_is_allowed($uid, $observer_xchan, $permission, $check_siteblock =
if(! $x) {
// not in address book and no guest token, see if they've got an xchan
+
$y = q("select xchan_network from xchan where xchan_hash = '%s' limit 1",
dbesc($observer_xchan)
);
@@ -327,7 +328,6 @@ function perm_is_allowed($uid, $observer_xchan, $permission, $check_siteblock =
}
$abperms = load_abconfig($uid,$observer_xchan,'my_perms');
}
-
// system is blocked to anybody who is not authenticated
@@ -382,7 +382,7 @@ function perm_is_allowed($uid, $observer_xchan, $permission, $check_siteblock =
// They are in your address book, but haven't been approved
- if($channel_perm & PERMS_PENDING) {
+ if($channel_perm & PERMS_PENDING && (! intval($x[0]['abook_pseudo']))) {
return true;
}