Changeset 770


Ignore:
Timestamp:
Jun 11, 2022 11:15:06 PM (23 months ago)
Author:
anonymous
Message:

Minor fixes

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/user.cli.php

    r695 r770  
    3939$rii->setMaxDepth(1);
    4040foreach ($rii as $filename => $file) {
    41     if (mb_strpos($filename, '/_config.inc.php') !== false) {
     41    if (mb_strpos($filename, '/_config.inc.php') !== false
     42    && preg_match('/^\$auth = new Auth/m', file_get_contents($filename))
     43    && preg_match('/^\$(db|pdo) =/m', file_get_contents($filename))) {
    4244        $_config_file = $filename;
    4345        echo "Loading $_config_file\n";
     
    4648}
    4749if (!$_config_file) {
    48     echo "Error: could not find _config.inc.php in current directory or subdirectories.\n";
     50    echo "Error: could not find a satisfactory _config.inc.php in current directory or subdirectories.\n";
    4951    exit(1);
    5052}
    5153define('_CLI', true);
    5254require_once $_config_file;
     55die;///
    5356
    5457/********************************************************************
  • trunk/lib/Email.inc.php

    r767 r770  
    372372        foreach ($headers as $key => $val) {
    373373            // Validate key and values.
    374             if (!strlen($val)) {
     374            if (!isset($val) || !strlen($val)) {
    375375                $app->logMsg(sprintf('Empty email header provided: %s', $key), LOG_NOTICE, __FILE__, __LINE__);
    376376                continue;
     
    447447        // Ensure message was successfully accepted for delivery.
    448448        if ($ret) {
    449             $app->logMsg(sprintf('Email successfully sent to %s', $final_to), LOG_INFO, __FILE__, __LINE__);
     449            $app->logMsg(sprintf('Email successfully sent to %s: %s', $final_to, $this->_params['subject']), LOG_INFO, __FILE__, __LINE__);
    450450            return true;
    451451        } else {
  • trunk/lib/Utilities.inc.php

    r768 r770  
    13731373    } else {
    13741374        $app =& App::getInstance();
    1375         $app->logMsg(sprintf('Failed signature (%s should be %s)', $signed_val, addSignature($val, $salt, $length)), LOG_DEBUG, __FILE__, __LINE__);
     1375        // A signature mismatch might occur if the signing_key is not the same across all environments, apache, cli, etc.
     1376        $app->logMsg(sprintf('Failed signature (%s should be %s).', $signed_val, addSignature($val, $salt, $length)), LOG_DEBUG, __FILE__, __LINE__);
    13761377        return false;
    13771378    }
  • trunk/lib/Validator.inc.php

    r769 r770  
    348348        }
    349349
    350         if ($strict && getmxrr('checkdnsrr', $hosts_notused) && !getmxrr($domain)) {
     350        if ($strict && function_exists('getmxrr') && !getmxrr($domain, $hosts_notused)) {
    351351            // Strict tests: check if MX record exists.
    352352            $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($val)), $type, $file, $line);
Note: See TracChangeset for help on using the changeset viewer.