aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-09-07 10:22:07 +0000
committerMario <mario@mariovavti.com>2021-09-07 10:22:07 +0000
commit8ec001c87b7508600ac45bb105c0f70d6369225d (patch)
treeee0a860d96b9517f18f83b3d459f9abdcf26f73a
parent9a3a0d94ea1e07594cf4fa9d0dbcf1f3843072c7 (diff)
parentddbc55d16611d3e7aa0c5af88072a004ff03c26d (diff)
downloadvolse-hubzilla-8ec001c87b7508600ac45bb105c0f70d6369225d.tar.gz
volse-hubzilla-8ec001c87b7508600ac45bb105c0f70d6369225d.tar.bz2
volse-hubzilla-8ec001c87b7508600ac45bb105c0f70d6369225d.zip
Merge branch 'dev' into 6.2RC
-rw-r--r--Zotlabs/Module/Display.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 5ffb1346c..02a79f854 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -37,7 +37,15 @@ class Display extends \Zotlabs\Web\Controller {
}
if($_REQUEST['mid']) {
- $item_hash = unpack_link_id($_REQUEST['mid']);
+ $item_hash = $_REQUEST['mid'];
+ }
+
+ $item_hash = unpack_link_id($item_hash);
+
+ if ($item_hash === false) {
+ App::$error = 400;
+ notice(t('Malformed message id.') . EOL);
+ return;
}
if(!$item_hash) {
@@ -95,11 +103,6 @@ class Display extends \Zotlabs\Web\Controller {
$target_item = null;
- if ($item_hash === false) {
- notice(t('Malformed message id.') . EOL);
- return;
- }
-
$r = q("select id, uid, mid, parent, parent_mid, thr_parent, verb, item_type, item_deleted, author_xchan, item_blocked from item where mid = '%s' limit 1",
dbesc($item_hash)
);
@@ -374,7 +377,7 @@ class Display extends \Zotlabs\Web\Controller {
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now', ATOM_TIME)),
'$author' => '',
'$owner' => '',
- '$profile_page' => xmlify(z_root() . '/display/' . $target_item['mid']),
+ '$profile_page' => xmlify(z_root() . '/display/' . gen_link_id($target_item['mid'])),
));
$x = [ 'xml' => $atom, 'channel' => $channel, 'observer_hash' => $observer_hash, 'params' => $params ];