aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/zot.php6
-rw-r--r--mod/magic.php6
-rw-r--r--mod/post.php6
-rw-r--r--version.inc2
-rw-r--r--view/theme/redbasic/css/style.css1
5 files changed, 19 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php
index 0290d1d46..fc1241ff2 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -101,6 +101,12 @@ function zot_build_packet($channel,$type = 'notify',$recipients = null, $remote_
'version' => ZOT_REVISION
);
+ // These fields are present when using magic auth
+
+ if(array_key_exists('token',$channel)) {
+ $data['sender']['token'] = $channel['token'];
+ $data['sender']['token_sig'] = $channel['token_sig'];
+ }
if($recipients)
$data['recipients'] = $recipients;
diff --git a/mod/magic.php b/mod/magic.php
index b74130005..3ae54bea0 100644
--- a/mod/magic.php
+++ b/mod/magic.php
@@ -53,9 +53,13 @@ function magic_init(&$a) {
}
$token = random_string();
-
+ $token_sig = rsa_sign($token,$channel['channel_prvkey']);
+
$recip = array(array('guid' => $x[0]['hubloc_guid'],'guid_sig' => $x[0]['hubloc_guid_sig']));
$channel = $a->get_channel();
+ $channel['token'] = $token;
+ $channel['token_sig'] = $token_sig;
+
$hash = random_string();
$r = q("insert into verify ( type, channel, token, meta, created) values ('%s','%d','%s','%s','%s')",
diff --git a/mod/post.php b/mod/post.php
index 53180e1c1..ee21f2ffb 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -165,6 +165,12 @@ function post_post(&$a) {
}
+ if($msgtype === 'auth') {
+ logger('mod_post: auth: ' . print_r($data,true));
+
+
+ }
+
}
diff --git a/version.inc b/version.inc
index 8d6a973e0..6c9b95b8c 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-01-20.206
+2013-01-21.207
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index e7c99f99f..7bcad2b2d 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -3584,6 +3584,7 @@ nav .nav-menu {
nav .nav-menu.selected {
border-bottom: 4px solid #CCCCCC;
}
+
nav .nav-notify {
background-color: #0d0;
color: #fff;