aboutsummaryrefslogtreecommitdiffstats
path: root/mod/post.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-23 15:13:09 -0800
committerfriendica <info@friendica.com>2013-12-23 15:13:09 -0800
commit63a42480c7eb36bdc8b63b31b2a4d222ba5751cd (patch)
treeb0bd80b8f114e2711152ce0374783a7106e068b1 /mod/post.php
parent4517bdcff1aa75c5389f9fb29947012fca5df4e1 (diff)
downloadvolse-hubzilla-63a42480c7eb36bdc8b63b31b2a4d222ba5751cd.tar.gz
volse-hubzilla-63a42480c7eb36bdc8b63b31b2a4d222ba5751cd.tar.bz2
volse-hubzilla-63a42480c7eb36bdc8b63b31b2a4d222ba5751cd.zip
add account_level, is_foreigner and is_member functions; convert all e2ee user input and prompts to hex to avoid javascipt's lame handling of quotes. !!This breaks all prior encrypted posts.!!
Diffstat (limited to 'mod/post.php')
-rw-r--r--mod/post.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/mod/post.php b/mod/post.php
index 7f495140e..965ba09a3 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -69,6 +69,7 @@ function post_init(&$a) {
* "success":1,
* "confirm":"q0Ysovd1u..."
* "service_class":(optional)
+ * "level":(optional)
* }
*
* 'confirm' in this case is the base64url encoded RSA signature of the concatenation of 'secret' with the
@@ -150,6 +151,7 @@ function post_init(&$a) {
$remote = remote_user();
$result = null;
$remote_service_class = '';
+ $remote_level = 0;
$remote_hub = $x[0]['hubloc_url'];
// Also check that they are coming from the same site as they authenticated with originally.
@@ -210,6 +212,8 @@ function post_init(&$a) {
}
if(array_key_exists('service_class',$j))
$remote_service_class = $j['service_class'];
+ if(array_key_exists('level',$j))
+ $remote_level = $j['level'];
}
// everything is good... maybe
if(local_user()) {
@@ -241,6 +245,7 @@ function post_init(&$a) {
$_SESSION['visitor_id'] = $x[0]['xchan_hash'];
$_SESSION['my_address'] = $address;
$_SESSION['remote_service_class'] = $remote_service_class;
+ $_SESSION['remote_level'] = $remote_level;
$_SESSION['remote_hub'] = $remote_hub;
$arr = array('xchan' => $x[0], 'url' => $desturl, 'session' => $_SESSION);