aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-28 19:04:36 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-28 19:04:36 -0700
commit3a8e1e04844fea2331525d82d8234b7006a12037 (patch)
tree984c54c3f219d704c7859bbb87d6ac4517418a88
parent67fe8fc4a7aa229857249caeaeb7d746d92ba325 (diff)
downloadvolse-hubzilla-3a8e1e04844fea2331525d82d8234b7006a12037.tar.gz
volse-hubzilla-3a8e1e04844fea2331525d82d8234b7006a12037.tar.bz2
volse-hubzilla-3a8e1e04844fea2331525d82d8234b7006a12037.zip
process_delivery: ignore self
-rwxr-xr-xboot.php2
-rw-r--r--include/zot.php6
-rw-r--r--install/update.php6
-rw-r--r--version.inc2
4 files changed, 13 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index 4d2296204..f2cd1b64c 100755
--- a/boot.php
+++ b/boot.php
@@ -49,7 +49,7 @@ define ( 'PLATFORM_NAME', 'redmatrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1155 );
+define ( 'DB_UPDATE_VERSION', 1156 );
/**
* @brief Constant with a HTML line break.
diff --git a/include/zot.php b/include/zot.php
index 6769241cb..635c36774 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1584,6 +1584,12 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
$channel = $r[0];
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
+ if($d['hash'] === $sender['hash']) {
+ $DR->update('self delivery ignored');
+ $result[] = $DR->get();
+ continue;
+ }
+
// allow public postings to the sys channel regardless of permissions, but not
// for comments travelling upstream. Wait and catch them on the way down.
diff --git a/install/update.php b/install/update.php
index 3ce1736f5..32ea3a2f1 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1155 );
+define( 'UPDATE_VERSION' , 1156 );
/**
*
@@ -1766,3 +1766,7 @@ function update_r1153() {
function update_r1154() {
return UPDATE_SUCCESS;
}
+
+function update_r1155() {
+ return UPDATE_SUCCESS;
+}
diff --git a/version.inc b/version.inc
index 0384d000f..80d66264c 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-09-27.1168
+2015-09-28.1169