Merge pull request #5676 from annando/issue-3501

Issue 3501: Mail contacts can be added again
This commit is contained in:
Tobias Diekershoff 2018-08-27 06:16:42 +02:00 committed by GitHub
commit 6c8ed888f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -45,7 +45,7 @@ class Proxy extends BaseModule
* *
* Question: Do we really need these three methods? * 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('HTTP/1.1 304 Not Modified');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
header('Etag: ' . $_SERVER['HTTP_IF_NONE_MATCH']); header('Etag: ' . $_SERVER['HTTP_IF_NONE_MATCH']);

View file

@ -1604,7 +1604,8 @@ class Probe
$user = DBA::selectFirst('user', ['prvkey'], ['uid' => $uid]); $user = DBA::selectFirst('user', ['prvkey'], ['uid' => $uid]);
$condition = ["`uid` = ? AND `server` != ''", $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)) { if (!DBA::isResult($user) || !DBA::isResult($mailacct)) {
return false; return false;

View file

@ -561,12 +561,12 @@ class Network
public static function isUrlBlocked($url) public static function isUrlBlocked($url)
{ {
$host = @parse_url($url, PHP_URL_HOST); $host = @parse_url($url, PHP_URL_HOST);
if (! $host) { if (!$host) {
return true; return false;
} }
$domain_blocklist = Config::get('system', 'blocklist', []); $domain_blocklist = Config::get('system', 'blocklist', []);
if (! $domain_blocklist) { if (!$domain_blocklist) {
return false; return false;
} }