aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-08-21 16:02:51 +0000
committerMario <mario@mariovavti.com>2022-08-21 16:02:51 +0000
commita8752844eff70e714fc8c5faaa3fdc62c95b7e04 (patch)
treebf7cce1de8b49cdd7c02f4c4bfe5d081497de39f /Zotlabs
parente04ce5028ee569154f2145ced4548fa4dd89ef6d (diff)
downloadvolse-hubzilla-a8752844eff70e714fc8c5faaa3fdc62c95b7e04.tar.gz
volse-hubzilla-a8752844eff70e714fc8c5faaa3fdc62c95b7e04.tar.bz2
volse-hubzilla-a8752844eff70e714fc8c5faaa3fdc62c95b7e04.zip
Activity: check for other forms of as:Public, Search: make sure to run htmlspecialchars_decode on the AP url so that previously encoded chars will be decoded again
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php3
-rw-r--r--Zotlabs/Module/Search.php15
2 files changed, 10 insertions, 8 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 7840e9999..67cfeea79 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2680,8 +2680,7 @@ class Activity {
// assume this is private unless specifically told otherwise.
$s['item_private'] = 1;
-
- if ($act->recips && in_array(ACTIVITY_PUBLIC_INBOX, $act->recips)) {
+ if ($act->recips && (in_array(ACTIVITY_PUBLIC_INBOX, $act->recips) || in_array('Public', $act->recips) || in_array('as:Public', $act->recips))) {
$s['item_private'] = 0;
}
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index efea7bbdd..da4752186 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -59,15 +59,18 @@ class Search extends Controller {
$o .= search($search, 'search-box', '/search', ((local_channel()) ? true : false));
if (local_channel() && strpos($search, 'https://') === 0 && !$update && !$load) {
- if (strpos($search, 'b64.') !== false) {
- if (strpos($search, '?') !== false) {
- $search = strtok($search, '?');
+
+ $url = htmlspecialchars_decode($search);
+
+ if (strpos($url, 'b64.') !== false) {
+ if (strpos($url, '?') !== false) {
+ $url = strtok($url, '?');
}
- $search = unpack_link_id(basename($search));
+ $url = unpack_link_id(basename($url));
}
- $f = Libzot::fetch_conversation(App::get_channel(), punify($search), true);
+ $f = Libzot::fetch_conversation(App::get_channel(), punify($url), true);
if ($f) {
$mid = $f[0]['message_id'];
@@ -83,7 +86,7 @@ class Search extends Controller {
else {
// try other fetch providers (e.g. diaspora, pubcrawl)
$hookdata = [
- 'url' => punify($search)
+ 'url' => punify($url)
];
call_hooks('fetch_provider', $hookdata);
}