PHP warning

escapeshellcmd() has been disabled for security reasons

/var/www/html/application/third_party/phpmailer/src/PHPMailer.php(1789)

1777      * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
1778      *
1779      * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
1780      *
1781      * @param string $string The string to be validated
1782      *
1783      * @return bool
1784      */
1785     protected static function isShellSafe($string)
1786     {
1787         //Future-proof
1788         if (
1789             escapeshellcmd($string) !== $string
1790             || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""])
1791         ) {
1792             return false;
1793         }
1794 
1795         $length = strlen($string);
1796 
1797         for ($i = 0; $i < $length; ++$i) {
1798             $c = $string[$i];
1799 
1800             //All other characters have a special meaning in at least one common shell, including = and +.
1801             //Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here.

Stack Trace

#0
+
 /var/www/html/application/third_party/phpmailer/src/PHPMailer.php(1789): escapeshellcmd("denis@sondages.pro")
1784      */
1785     protected static function isShellSafe($string)
1786     {
1787         //Future-proof
1788         if (
1789             escapeshellcmd($string) !== $string
1790             || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""])
1791         ) {
1792             return false;
1793         }
1794 
#1
+
 /var/www/html/application/third_party/phpmailer/src/PHPMailer.php(1882): PHPMailer\PHPMailer\PHPMailer::isShellSafe("denis@sondages.pro")
1877         if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
1878             //PHP config has a sender address we can use
1879             $this->Sender = ini_get('sendmail_from');
1880         }
1881         if (!empty($this->Sender) && static::validateAddress($this->Sender)) {
1882             if (self::isShellSafe($this->Sender)) {
1883                 $params = sprintf('-f%s', $this->Sender);
1884             }
1885             $old_from = ini_get('sendmail_from');
1886             ini_set('sendmail_from', $this->Sender);
1887         }
#2
+
 /var/www/html/application/third_party/phpmailer/src/PHPMailer.php(1645): PHPMailer\PHPMailer\PHPMailer->mailSend("Date: Wed, 8 Dec 2021 09:04:19 +0100 From: Administrateur <denis...", "This is a test email from LimeSurvey ")
1640                 case 'qmail':
1641                     return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody);
1642                 case 'smtp':
1643                     return $this->smtpSend($this->MIMEHeader, $this->MIMEBody);
1644                 case 'mail':
1645                     return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
1646                 default:
1647                     $sendMethod = $this->Mailer . 'Send';
1648                     if (method_exists($this, $sendMethod)) {
1649                         return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
1650                     }
2021-12-08 09:04:19 Apache Yii Framework/1.1.24-dev