aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Daemon/Cron.php2
-rw-r--r--Zotlabs/Daemon/CurlAuth.php6
-rw-r--r--Zotlabs/Daemon/Master.php2
-rw-r--r--Zotlabs/Daemon/Poller.php2
-rw-r--r--Zotlabs/Lib/Activity.php45
-rw-r--r--Zotlabs/Lib/Queue.php2
-rw-r--r--Zotlabs/Module/Directory.php2
-rw-r--r--Zotlabs/Module/Zotfeed.php2
-rw-r--r--include/channel.php4
-rw-r--r--include/connections.php5
-rw-r--r--include/queue_fn.php2
-rw-r--r--include/zot.php1
-rwxr-xr-xview/tpl/conv_item.tpl2
-rwxr-xr-xview/tpl/conv_list.tpl2
-rw-r--r--view/tpl/usermenu.tpl2
-rwxr-xr-xview/tpl/xchan_vcard.tpl2
16 files changed, 58 insertions, 25 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php
index fe356bcbf..a08d2b7d2 100644
--- a/Zotlabs/Daemon/Cron.php
+++ b/Zotlabs/Daemon/Cron.php
@@ -215,7 +215,7 @@ class Cron {
$restart = true;
$generation = intval($argv[2]);
if(! $generation)
- killme();
+ return;
}
reload_plugins();
diff --git a/Zotlabs/Daemon/CurlAuth.php b/Zotlabs/Daemon/CurlAuth.php
index be12bc779..de41382e3 100644
--- a/Zotlabs/Daemon/CurlAuth.php
+++ b/Zotlabs/Daemon/CurlAuth.php
@@ -13,7 +13,7 @@ class CurlAuth {
static public function run($argc,$argv) {
if($argc != 2)
- killme();
+ return;
\App::$session->start();
@@ -50,6 +50,6 @@ class CurlAuth {
file_put_contents($c,$x);
- killme();
+ return;
}
-} \ No newline at end of file
+}
diff --git a/Zotlabs/Daemon/Master.php b/Zotlabs/Daemon/Master.php
index 67a3acc0a..8c3a7e570 100644
--- a/Zotlabs/Daemon/Master.php
+++ b/Zotlabs/Daemon/Master.php
@@ -9,7 +9,7 @@ if(array_search( __file__ , get_included_files()) === 0) {
if($argc)
Master::Release($argc,$argv);
- killme();
+ return;
}
diff --git a/Zotlabs/Daemon/Poller.php b/Zotlabs/Daemon/Poller.php
index 84bf7e923..ebc0584ba 100644
--- a/Zotlabs/Daemon/Poller.php
+++ b/Zotlabs/Daemon/Poller.php
@@ -47,7 +47,7 @@ class Poller {
$restart = true;
$generation = intval($argv[2]);
if(! $generation)
- killme();
+ return;
}
if(($argc > 1) && intval($argv[1])) {
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 0757eec37..f9ec3a677 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -293,8 +293,14 @@ class Activity {
$ret = [];
- $objtype = self::activity_obj_mapper($i['obj_type']);
-
+ if($i['verb'] === ACTIVITY_FRIEND) {
+ // Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
+ $objtype = 'Note';
+ }
+ else {
+ $objtype = self::activity_obj_mapper($i['obj_type']);
+ }
+
if(intval($i['item_deleted'])) {
$ret['type'] = 'Tombstone';
$ret['formerType'] = $objtype;
@@ -486,6 +492,12 @@ class Activity {
$ret = [];
$reply = false;
+
+ if($i['verb'] === ACTIVITY_FRIEND) {
+ // Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
+ $ret['obj'] = [];
+ }
+
if(intval($i['item_deleted'])) {
$ret['type'] = 'Tombstone';
$ret['formerType'] = self::activity_obj_mapper($i['obj_type']);
@@ -498,11 +510,6 @@ class Activity {
return $ret;
}
- if($i['verb'] === ACTIVITY_FRIEND) {
- // Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
- $ret['obj_type'] = ACTIVITY_OBJ_NOTE;
- $ret['obj'] = [];
- }
$ret['type'] = self::activity_mapper($i['verb']);
@@ -516,6 +523,25 @@ class Activity {
xchan_query($p,true);
$p = fetch_post_tags($p,true);
$i['obj'] = self::encode_item($p[0]);
+
+ // convert to zot6 emoji reaction encoding which uses the target object to indicate the
+ // specific emoji instead of overloading the verb or type.
+
+ $im = explode('#',$i['verb']);
+ if($im && count($im) > 1)
+ $emoji = $im[1];
+ if(preg_match("/\[img(.*?)\](.*?)\[\/img\]/ism", $i['body'], $match)) {
+ $ln = $match[2];
+ }
+
+ $i['tgt_type'] = 'Image';
+
+ $i['target'] = [
+ 'type' => 'Image',
+ 'name' => $emoji,
+ 'url' => (($ln) ? $ln : z_root() . '/images/emoji/' . $emoji . '.png')
+ ];
+
}
}
@@ -596,7 +622,7 @@ class Activity {
$i['obj'] = json_decode($i['obj'],true);
}
if($i['obj']['type'] === ACTIVITY_OBJ_PHOTO) {
- $i['obj']['id'] = $i['id'];
+ $i['obj']['id'] = $i['mid'];
}
$obj = self::encode_object($i['obj']);
@@ -778,6 +804,9 @@ class Activity {
if(strpos($verb,ACTIVITY_MOOD) !== false)
return 'Create';
+ if(strpos($verb,ACTIVITY_FRIEND) !== false)
+ return 'Create';
+
if(strpos($verb,ACTIVITY_POKE) !== false)
return 'Activity';
diff --git a/Zotlabs/Lib/Queue.php b/Zotlabs/Lib/Queue.php
index baa1da70d..49891a55b 100644
--- a/Zotlabs/Lib/Queue.php
+++ b/Zotlabs/Lib/Queue.php
@@ -250,7 +250,7 @@ class Queue {
$host_crypto = null;
if($channel && $base) {
- $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
+ $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_sitekey != '' order by hubloc_id desc limit 1",
dbesc($base)
);
if($h) {
diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php
index 8f5db6635..dee22721d 100644
--- a/Zotlabs/Module/Directory.php
+++ b/Zotlabs/Module/Directory.php
@@ -345,7 +345,7 @@ class Directory extends \Zotlabs\Web\Controller {
'pdesc_label' => t('Description:'),
'marital' => $marital,
'homepage' => $homepage,
- 'homepageurl' => linkify($homepageurl),
+ 'homepageurl' => linkify($homepageurl, true),
'hometown' => $hometown,
'hometown_label' => t('Hometown:'),
'about' => $about,
diff --git a/Zotlabs/Module/Zotfeed.php b/Zotlabs/Module/Zotfeed.php
index 381e3acb2..8c13682b4 100644
--- a/Zotlabs/Module/Zotfeed.php
+++ b/Zotlabs/Module/Zotfeed.php
@@ -42,7 +42,7 @@ class Zotfeed extends \Zotlabs\Web\Controller {
}
logger('zotfeed request: ' . $r[0]['channel_name'], LOGGER_DEBUG);
-
+ $result['project'] = 'Hubzilla';
$result['messages'] = zot_feed($r[0]['channel_id'],$observer['xchan_hash'],array('mindate' => $mindate));
$result['success'] = true;
json_return_and_die($result);
diff --git a/include/channel.php b/include/channel.php
index 7c0397e11..5d583e4f1 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1718,9 +1718,9 @@ function advanced_profile() {
if(App::$profile['sexual']) $profile['sexual'] = array( t('Sexual Preference:'), App::$profile['sexual'] );
- if(App::$profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify(App::$profile['homepage']) );
+ if(App::$profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify(App::$profile['homepage'], true) );
- if(App::$profile['hometown']) $profile['hometown'] = array( t('Hometown:'), linkify(App::$profile['hometown']) );
+ if(App::$profile['hometown']) $profile['hometown'] = array( t('Hometown:'), linkify(App::$profile['hometown'], true) );
if(App::$profile['politic']) $profile['politic'] = array( t('Political Views:'), App::$profile['politic']);
diff --git a/include/connections.php b/include/connections.php
index e942503f0..51df18b70 100644
--- a/include/connections.php
+++ b/include/connections.php
@@ -299,6 +299,11 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) {
$r = q("delete from pgrp_member where xchan = '%s'",
dbesc($xchan)
);
+
+ // Cannot delete just one side of the conversation since we do not allow
+ // you to block private mail replies. This would leave open a gateway for abuse.
+ // Both participants are owners of the conversation and both can remove it.
+
$r = q("delete from mail where ( from_xchan = '%s' or to_xchan = '%s' )",
dbesc($xchan),
dbesc($xchan)
diff --git a/include/queue_fn.php b/include/queue_fn.php
index 85f98aaf9..865228041 100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
@@ -286,7 +286,7 @@ function queue_deliver($outq, $immediate = false) {
$host_crypto = null;
if($channel && $base) {
- $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
+ $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_sitekey != '' order by hubloc_id desc limit 1",
dbesc($base)
);
if($h) {
diff --git a/include/zot.php b/include/zot.php
index 60bada1d6..bd85dd755 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2392,7 +2392,6 @@ function process_mail_delivery($sender, $arr, $deliveries) {
}
}
-
$r = q("select id, conv_guid from mail where mid = '%s' and channel_id = %d limit 1",
dbesc($arr['mid']),
intval($channel['channel_id'])
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 09a2e05e0..186551e2d 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -20,7 +20,7 @@
{{/if}}
{{if $item.title && !$item.event}}
<div class="p-2{{if $item.is_new}} bg-primary text-white{{/if}} wall-item-title h3{{if !$item.photo}} rounded-top{{/if}}" id="wall-item-title-{{$item.id}}">
- {{if $item.title_tosource}}{{if $item.plink}}<a href="{{$item.plink.href}}" title="{{$item.title}} ({{$item.plink.title}})">{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}</a>{{/if}}{{/if}}
+ {{if $item.title_tosource}}{{if $item.plink}}<a href="{{$item.plink.href}}" title="{{$item.title}} ({{$item.plink.title}})" rel="nofollow">{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}</a>{{/if}}{{/if}}
</div>
{{if ! $item.is_new}}
<hr class="m-0">
diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl
index a0c2cf827..8c5b47bf3 100755
--- a/view/tpl/conv_list.tpl
+++ b/view/tpl/conv_list.tpl
@@ -20,7 +20,7 @@
{{/if}}
{{if $item.title && !$item.event}}
<div class="p-2{{if $item.is_new}} bg-primary text-white{{/if}} wall-item-title h3{{if !$item.photo}} rounded-top{{/if}}" id="wall-item-title-{{$item.id}}">
- {{if $item.title_tosource}}{{if $item.plink}}<a href="{{$item.plink.href}}" title="{{$item.title}} ({{$item.plink.title}})">{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}</a>{{/if}}{{/if}}
+ {{if $item.title_tosource}}{{if $item.plink}}<a href="{{$item.plink.href}}" title="{{$item.title}} ({{$item.plink.title}})" rel="nofollow">{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}</a>{{/if}}{{/if}}
</div>
{{if ! $item.is_new}}
<hr class="m-0">
diff --git a/view/tpl/usermenu.tpl b/view/tpl/usermenu.tpl
index 8bbfedd07..535d5b5a8 100644
--- a/view/tpl/usermenu.tpl
+++ b/view/tpl/usermenu.tpl
@@ -8,7 +8,7 @@
<ul class="pmenu-body{{if $wrap || !$class}} nav nav-pills flex-column{{elseif !$wrap || $class}} {{$class}}{{/if}}">
{{foreach $items as $mitem }}
<li id="pmenu-item-{{$mitem.mitem_id}}" class="nav-item pmenu-item{{if $mitem.submenu}} dropdown{{/if}}">
- <a href="{{if $mitem.submenu}}#{{else}}{{$mitem.mitem_link}}{{/if}}" class="nav-link {{if $mitem.submenu}} dropdown-toggle{{/if}}"{{if $mitem.submenu}} data-toggle="dropdown"{{/if}}{{if $mitem.newwin}}target="_blank"{{/if}}>{{$mitem.mitem_desc}}{{if $mitem.submenu}}<span class="caret"></span>{{/if}}</a>
+ <a href="{{if $mitem.submenu}}#{{else}}{{$mitem.mitem_link}}{{/if}}" class="nav-link {{if $mitem.submenu}} dropdown-toggle{{/if}}"{{if $mitem.submenu}} data-toggle="dropdown"{{/if}}{{if $mitem.newwin}}target="_blank"{{/if}} rel="nofollow noopener">{{$mitem.mitem_desc}}{{if $mitem.submenu}}<span class="caret"></span>{{/if}}</a>
{{if $mitem.submenu}}{{$mitem.submenu}}{{/if}}
</li>
{{/foreach }}
diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl
index ac796cd47..9c357bba8 100755
--- a/view/tpl/xchan_vcard.tpl
+++ b/view/tpl/xchan_vcard.tpl
@@ -1,7 +1,7 @@
<div id="vcard" class="vcard h-card">
<div id="profile-photo-wrapper"><a href="{{$link}}"><img class="vcard-photo photo u-photo" src="{{$photo}}" alt="{{$name}}" /></a></div>
{{if $connect}}
-<div class="connect-btn-wrapper"><a href="follow?f=&url={{$follow}}" class="btn btn-block btn-success btn-sm"><i class="fa fa-plus"></i> {{$connect}}</a></div>
+<div class="connect-btn-wrapper"><a href="follow?f=&url={{$follow}}" class="btn btn-block btn-success btn-sm" rel="nofollow"><i class="fa fa-plus"></i> {{$connect}}</a></div>
{{/if}}
<div class="fn p-name">{{$name}}</div>
</div>