]> git.mxchange.org Git - friendica.git/commitdiff
Still there had been notices - must have a good camouflage
authorMichael <heluecht@pirati.ca>
Fri, 31 Aug 2018 05:08:22 +0000 (05:08 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 31 Aug 2018 05:08:22 +0000 (05:08 +0000)
mod/contacts.php
src/Module/Proxy.php
src/Object/Image.php
src/Protocol/DFRN.php

index 4e8769717212eaa81dc03b2151803ac09f7ce017..cfe968226df462c69ba52d01eede0b548990baa7 100644 (file)
@@ -122,11 +122,12 @@ function contacts_init(App $a)
 
 function contacts_batch_actions(App $a)
 {
-       $contacts_id = $_POST['contact_batch'];
-       if (!is_array($contacts_id)) {
+       if (empty($_POST['contact_batch']) || !is_array($_POST['contact_batch'])) {
                return;
        }
 
+       $contacts_id = $_POST['contact_batch'];
+
        $orig_records = q("SELECT * FROM `contact` WHERE `id` IN (%s) AND `uid` = %d AND `self` = 0",
                implode(",", $contacts_id),
                intval(local_user())
index ccd00c6040fb8be879ba3e9fef2bdae6e88cf3de..7983e01f7aad95b1b69727886d7fc63e1aeb2c1e 100644 (file)
@@ -133,6 +133,10 @@ class Proxy extends BaseModule
                        $direct_cache = false;
                }
 
+               if (empty($_REQUEST['url'])) {
+                       System::httpExit(400, ["title" => L10n::t('Bad Request.')]);
+               }
+
                if (!$direct_cache) {
                        $urlhash = 'pic:' . sha1($_REQUEST['url']);
 
index 9506aedc2239b738b96d8136d8bd4eb60f9a5356..620929df5104a4e4e07dc4f22378fb8ad4003405 100644 (file)
@@ -792,7 +792,7 @@ class Image
 
                        try {
                                if (function_exists("getimagesizefromstring")) {
-                                       $data = getimagesizefromstring($img_str);
+                                       $data = @getimagesizefromstring($img_str);
                                } else {
                                        $tempfile = tempnam(get_temppath(), "cache");
 
index 759f7f5f28b03c7596e7b42f607f88bfad67a1f5..c4355503137923dc9c662f38e626b040b2be20c3 100644 (file)
@@ -2407,8 +2407,11 @@ class DFRN
                                                break;
                                        case "enclosure":
                                                $enclosure = $href;
-                                               if (strlen($item["attach"])) {
+
+                                               if (!empty($item["attach"])) {
                                                        $item["attach"] .= ",";
+                                               } else {
+                                                       $item["attach"] = "";
                                                }
 
                                                $item["attach"] .= '[attach]href="' . $href . '" length="' . $length . '" type="' . $type . '" title="' . $title . '"[/attach]';