]> git.mxchange.org Git - friendica.git/commitdiff
Issue 3501: Mail contacts can be added again
authorMichael <heluecht@pirati.ca>
Sun, 26 Aug 2018 19:49:39 +0000 (19:49 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 26 Aug 2018 19:49:39 +0000 (19:49 +0000)
src/Module/Proxy.php
src/Network/Probe.php
src/Util/Network.php

index bf6d6b6d03e5e7559997f51dad73a8765ddab825..ccd00c6040fb8be879ba3e9fef2bdae6e88cf3de 100644 (file)
@@ -45,7 +45,7 @@ class Proxy extends BaseModule
                 *
                 * Question: Do we really need these three methods?
                 */
-               if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
+               if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
                        header('HTTP/1.1 304 Not Modified');
                        header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
                        header('Etag: ' . $_SERVER['HTTP_IF_NONE_MATCH']);
index 258bb6c628cd3271b45f54fc6eb6d8656217e870..408fd01dcbe6af2bf2dd3d6b4d2f3ba4d5652e61 100644 (file)
@@ -1604,7 +1604,8 @@ class Probe
                $user = DBA::selectFirst('user', ['prvkey'], ['uid' => $uid]);
 
                $condition = ["`uid` = ? AND `server` != ''", $uid];
-               $mailacct = DBA::selectFirst('mailacct', ['pass', 'user'], $condition);
+               $fields = ['pass', 'user', 'server', 'port', 'ssltype', 'mailbox'];
+               $mailacct = DBA::selectFirst('mailacct', $fields, $condition);
 
                if (!DBA::isResult($user) || !DBA::isResult($mailacct)) {
                        return false;
index 49ed03dc3ec57c1d50e4931202c4de2a91e8ad1e..0de96618597cae89b0408677329d18c8720729b1 100644 (file)
@@ -561,12 +561,12 @@ class Network
        public static function isUrlBlocked($url)
        {
                $host = @parse_url($url, PHP_URL_HOST);
-               if (! $host) {
-                       return true;
+               if (!$host) {
+                       return false;
                }
 
                $domain_blocklist = Config::get('system', 'blocklist', []);
-               if (! $domain_blocklist) {
+               if (!$domain_blocklist) {
                        return false;
                }