]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagger.php
Merge pull request #11780 from annando/untrusted
[friendica.git] / mod / tagger.php
index 4afe6efb67a9115b9c0714bc3f464eaa0e460284..e674efba698a567a66398eb8dc8c2ccccd6aaee4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -41,7 +41,7 @@ function tagger_content(App $a) {
                return;
        }
 
-       $term = trim($_GET['term']);
+       $term = trim($_GET['term'] ?? '');
        // no commas allowed
        $term = str_replace([',',' ', '<', '>'],['','_', '', ''], $term);
 
@@ -73,7 +73,7 @@ function tagger_content(App $a) {
                return;
        }
 
-       $uri = Item::newURI($owner_uid);
+       $uri = Item::newURI();
        $xterm = XML::escape($term);
        $post_type = (($item['resource-id']) ? DI::l10n()->t('photo') : DI::l10n()->t('status'));
        $targettype = (($item['resource-id']) ? Activity\ObjectType::IMAGE : Activity\ObjectType::NOTE );
@@ -167,6 +167,5 @@ EOT;
        $post = Post::selectFirst(['uri-id', 'uid'], ['id' => $post_id]);
 
        Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, $post['uri-id'], $post['uid']);
-
-       exit();
+       System::exit();
 }