Skip to content

Commit 12177e6

Browse files
committed
Merge branch 'master' of https://github.com/phpList/phplist3 into release-3.5.9
2 parents e2cc541 + 38c9945 commit 12177e6

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#
77
[![Build Status](https://travis-ci.com/phpList/phplist3.svg?branch=master)](https://travis-ci.com/phpList/phplist3)
8-
[![Stable release](https://img.shields.io/badge/stable-3.5.6-blue.svg)](https://sourceforge.net/projects/phplist/files/phplist/)
8+
[![Stable release](https://img.shields.io/badge/stable-3.5.9-blue.svg)](https://sourceforge.net/projects/phplist/files/phplist/)
99
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
1010
<a href="http://translate.phplist.org/engage/phplist/?utm_source=widget">
1111
<img src="http://translate.phplist.org/widgets/phplist/-/svg-badge.svg" alt="Translation status" />

public_html/lists/admin/defaultplugin.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,16 @@ public function validateEmailAddress($emailAddress)
10861086
return true;
10871087
}
10881088

1089+
/**
1090+
* isBlacklistedEmail
1091+
* @param string $emailaddress
1092+
* @return bool true if email address should is considered blacklisted
1093+
*/
1094+
public function isBlackListedEmail($email = '')
1095+
{
1096+
return false;
1097+
}
1098+
10891099
/**
10901100
* Allow additional processing of a link click.
10911101
*

public_html/lists/admin/importadmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
}
265265

266266
Sql_query(sprintf('replace into %s (adminattributeid,adminid,value) values("%s","%s","%s")',
267-
$tables['admin_attribute'], $attribute_index, $adminid, $att_value));
267+
$tables['admin_attribute'], $attribute_index, $adminid, sql_escape($att_value)));
268268
}
269269
}
270270

public_html/lists/admin/inc/userlib.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,19 @@ function isBlackListed($email = '', $immediate = true)
509509
$req = Sql_Query(sprintf('select * from %s where email = "%s" and date_add(added,interval %d minute) < now()',
510510
$GLOBALS['tables']['user_blacklist'], sql_escape($email), $gracetime));
511511

512-
return Sql_Affected_Rows();
512+
$isBlackListed = Sql_Affected_Rows();
513+
## ask plugins as well
514+
if (!$isBlackListed) {
515+
if (isset($GLOBALS['plugins']) && is_array($GLOBALS['plugins'])) {
516+
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
517+
if (method_exists($plugin, "isBlacklistedEmail")) {
518+
$isBlackListed = $plugin->isBlacklistedEmail($email);
519+
}
520+
if ($isBlackListed) break;
521+
}
522+
}
523+
}
524+
return $isBlackListed;
513525
}
514526

515527
/**

public_html/lists/admin/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,22 +525,22 @@ function mb_strtolower($string)
525525
}
526526

527527
# if (!DEVVERSION) { ## why not, quite useful to see
528-
528+
if (ALLOW_UPDATER) {
529529
$updaterdir = __DIR__ . '/../updater';
530530

531531
include 'updateLib.php';
532532
$updateNotif = checkForUpdate();
533533
$moreInfo = ' <ul><li><a href="https://www.phplist.com/download?utm_source=pl' . VERSION . '&amp;utm_medium=updatedownload&amp;utm_campaign=phpList" title="' . s('Download the new version') . '" target="_blank">' . s('Download the new version') . '</a></li>';
534534

535-
if (file_exists($updaterdir) && ALLOW_UPDATER) {
535+
if (file_exists($updaterdir)) {
536536
$moreInfo .= '<li>'.s('or use the %sphpList Updater%s','<a href="?page=update" title="' . s('automatic updater') . '">','</a>');
537537
}
538538
$moreInfo .= '</ul>';
539539

540540
if ($updateNotif !== '') {
541541
Info($updateNotif . '' . $moreInfo);
542542
}
543-
543+
}
544544
# }
545545

546546
if (version_compare(PHP_VERSION, '5.3.3', '<') && WARN_ABOUT_PHP_SETTINGS) {

0 commit comments

Comments
 (0)