From e800e2db2b6149cb1a3d32bb111fc23eb8bcc2c4 Mon Sep 17 00:00:00 2001 From: "DM42.Net Zap Dev" Date: Mon, 19 Aug 2019 23:13:19 -0400 Subject: [PATCH 01/22] Return in the case of further processing --- Zotlabs/Daemon/Cron.php | 2 +- Zotlabs/Daemon/CurlAuth.php | 6 +++--- Zotlabs/Daemon/Master.php | 2 +- Zotlabs/Daemon/Poller.php | 2 +- 4 files changed, 6 insertions(+), 6 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])) { From 60919488f17ded7bcd1dd48429baaca530475161 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 23 Aug 2019 23:58:07 +0200 Subject: [PATCH 02/22] Better spoiler BBcode tag conversion to Markdown --- include/markdown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/markdown.php b/include/markdown.php index 0a8076799..213986867 100644 --- a/include/markdown.php +++ b/include/markdown.php @@ -266,7 +266,7 @@ function bb_to_markdown($Text, $options = []) { $Text = preg_replace("/\[zrl\=\].*?\[\/zrl\]/is", "", $Text); // Remove unprocessed spoiler HTML tags - $Text = strip_tags(preg_replace("/(<\/div>)(>.+)$/im", "$1\n$2", $Text)); + $Text = preg_replace("/([^<]+)<.+>(>.+)$/im", "$1\n$2", $Text); $Text = trim($Text); From 51954c7f3de4940bb9bdc545f8a2a26e6ea7b101 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 30 Aug 2019 00:51:46 +0200 Subject: [PATCH 03/22] Add CalDAV / CardDAV autodiscovery --- Zotlabs/Module/Well_known.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Zotlabs/Module/Well_known.php b/Zotlabs/Module/Well_known.php index 09e743788..d322c016c 100644 --- a/Zotlabs/Module/Well_known.php +++ b/Zotlabs/Module/Well_known.php @@ -63,6 +63,18 @@ class Well_known extends \Zotlabs\Web\Controller { case 'dnt-policy.txt': echo file_get_contents('doc/dnt-policy.txt'); killme(); + + case 'caldav': + if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND') { + http_status('301', 'moved permanently'); + goaway(z_root() . '/cdav'); + }; + + case 'caldav': + if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND') { + http_status('301', 'moved permanently'); + goaway(z_root() . '/cdav'); + }; default: if(file_exists(\App::$cmd)) { From d267dd251579c28346882a3c69c5749fa4b6962d Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 30 Aug 2019 00:55:36 +0200 Subject: [PATCH 04/22] Update Well_known.php --- Zotlabs/Module/Well_known.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Module/Well_known.php b/Zotlabs/Module/Well_known.php index d322c016c..140ab260d 100644 --- a/Zotlabs/Module/Well_known.php +++ b/Zotlabs/Module/Well_known.php @@ -70,7 +70,7 @@ class Well_known extends \Zotlabs\Web\Controller { goaway(z_root() . '/cdav'); }; - case 'caldav': + case 'carddav': if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND') { http_status('301', 'moved permanently'); goaway(z_root() . '/cdav'); From 93ec01e0a1fcf7a5574d8bf6ac044331b5b94724 Mon Sep 17 00:00:00 2001 From: Terrox Date: Tue, 3 Sep 2019 14:32:52 +0200 Subject: [PATCH 05/22] More nofollow tags to discourage backlink farmers --- Zotlabs/Module/Directory.php | 2 +- include/channel.php | 4 ++-- view/tpl/conv_item.tpl | 2 +- view/tpl/conv_list.tpl | 2 +- view/tpl/usermenu.tpl | 2 +- view/tpl/xchan_vcard.tpl | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) 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/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/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}}
- {{if $item.title_tosource}}{{if $item.plink}}{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}{{/if}}{{/if}} + {{if $item.title_tosource}}{{if $item.plink}}{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}{{/if}}{{/if}}
{{if ! $item.is_new}}
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}}
- {{if $item.title_tosource}}{{if $item.plink}}{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}{{/if}}{{/if}} + {{if $item.title_tosource}}{{if $item.plink}}{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}{{/if}}{{/if}}
{{if ! $item.is_new}}
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 @@