aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/post.php14
-rw-r--r--version.inc2
2 files changed, 15 insertions, 1 deletions
diff --git a/mod/post.php b/mod/post.php
index 64e08e632..0ce58ec9f 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -265,6 +265,7 @@ function post_post(&$a) {
if((! $forgery) && (! $secret_fail))
break;
}
+
if($forgery) {
$ret['message'] = 'possible site forgery';
logger('mod_zot: pickup: ' . $ret['message']);
@@ -312,6 +313,7 @@ function post_post(&$a) {
);
}
}
+
$encrypted = crypto_encapsulate(json_encode($ret),$sitekey);
json_return_and_die($encrypted);
@@ -355,6 +357,18 @@ function post_post(&$a) {
intval($hub['hubloc_id'])
);
+ /**
+ * This hub has now been proven to be valid.
+ * Any hub with the same URL and a different sitekey cannot be valid.
+ * Get rid of them (mark them deleted). There's a good chance they were re-installs.
+ *
+ */
+
+ q("update hubloc set hubloc_flags = ( hubloc_flags | %d ) where hubloc_url = '%s' and hubloc_sitekey != '%s' ",
+ intval(HUBLOC_FLAGS_DELETED),
+ dbesc($hub['hubloc_url']),
+ dbesc($hub['hubloc_sitekey'])
+ );
// TODO: check which hub is primary and take action if mismatched
diff --git a/version.inc b/version.inc
index ab46c45fd..3e026cef2 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-11-20.503
+2013-11-21.504