Merge branch 'postfixadmin:master' into master

This commit is contained in:
Jan Kruis authored and GitHub committed 2022-10-17 02:43:43 +02:00
commit 690380bb28
5 files changed
+16 -26

No files matched your search

+2 -1
View File
@@ -4,7 +4,7 @@ on: [push]
jobs:
lint_etc:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
@@ -63,6 +63,7 @@ jobs:
build_coverage_report:
needs: [testsuite]
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
+10 -23
View File
@@ -403,22 +403,6 @@ function safepost($param, $default = "")
return $retval;
}
/**
* safeserver
* @param string $param
* @param string $default (optional)
* @return string value from $_SERVER[$param] or $default
* @see safeget()
*/
function safeserver($param, $default = "")
{
$retval = $default;
if (isset($_SERVER[$param])) {
$retval = $_SERVER[$param];
}
return $retval;
}
/**
* safecookie
* @param string $param
@@ -429,7 +413,7 @@ function safeserver($param, $default = "")
function safecookie($param, $default = "")
{
$retval = $default;
if (isset($_COOKIE[$param]) && is_string($_COOKIE[$param])) {
if (isset($_COOKIE[$param])) {
$retval = $_COOKIE[$param];
}
return $retval;
@@ -894,13 +878,16 @@ function generate_password($length = 12)
function validate_password($password)
{
$result = array();
$val_conf = Config::read_array('password_validation');
if (Config::has('min_password_length')) {
$minlen = (int)Config::read('min_password_length'); # used up to 2.3.x - check it for backward compatibility
if ($minlen > 0) {
$val_conf['/.{' . $minlen . '}/'] = "password_too_short $minlen";
}
$config = Config::getInstance()->getAll();
$val_conf = $config['password_validation'] ?? [];
$minlen = $config['min_password_length'] ?? null;
if (is_numeric($minlen) && $minlen > 0) {
$minlen = (int)$minlen; # used up to 2.3.x -
$val_conf['/.{' . $minlen . '}/'] = "password_too_short $minlen";
}
foreach ($val_conf as $regex => $message) {
+2
View File
@@ -740,6 +740,8 @@ class MailboxHandler extends PFAHandler
* created.
*
* @return boolean TRUE if everything succeeds, FALSE on all errors
*
* @todo rewrite/remove dependency on php-imap and use instead something like : https://www.php-imap.com/api/client
*/
protected function create_mailbox_subfolders()
{
+1 -1
View File
@@ -14,7 +14,7 @@
* File: editactive.php
* Used to switch active status for admins, domains, mailboxes, aliases and aliasdomains, etc.
*
* Template File:
* Template File:
* list-virutal.tpl
* list-virutal-alias.tpl which incl list-virutal.tpl
* list-virutal-alias_domains.tpl which incl list-virutal.tpl
+1 -1
View File
@@ -14,7 +14,7 @@
* File: list-virtual.php
* List virtual users for a domain.
*
* Template File:
* Template File:
* list-virutal.tpl
* list-virutal-alias.tpl which incl list-virutal.tpl
* list-virutal-alias_domains.tpl which incl list-virutal.tpl