summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-01-02 00:56:16 +0100
committeremkael <emkael@tlen.pl>2017-01-02 00:56:16 +0100
commit7449a8432875bf9916c3def3c25419f2e2eb99d1 (patch)
tree8af01bafa4e456a0bf2556ebdb981cdb63b47149
parenta6904faaaba78a5d08d2ca83de39457f540ad541 (diff)
* bumping PHPMailer to 5.2.21
-rw-r--r--lib/phpmailer/README.md10
-rw-r--r--lib/phpmailer/VERSION2
-rw-r--r--lib/phpmailer/changelog.md27
-rw-r--r--lib/phpmailer/class.phpmailer.php163
-rw-r--r--lib/phpmailer/class.phpmaileroauth.php1
-rw-r--r--lib/phpmailer/class.pop3.php2
-rw-r--r--lib/phpmailer/class.smtp.php73
-rw-r--r--lib/phpmailer/extras/htmlfilter.php11
-rw-r--r--lib/phpmailer/extras/ntlm_sasl_client.php4
-rw-r--r--lib/phpmailer/language/phpmailer.lang-cs.php25
-rw-r--r--lib/phpmailer/language/phpmailer.lang-da.php26
-rw-r--r--lib/phpmailer/language/phpmailer.lang-de.php26
-rw-r--r--lib/phpmailer/language/phpmailer.lang-es.php2
-rw-r--r--lib/phpmailer/language/phpmailer.lang-nb.php25
-rw-r--r--lib/phpmailer/language/phpmailer.lang-pt_br.php28
-rw-r--r--lib/phpmailer/language/phpmailer.lang-ro.php34
-rw-r--r--lib/phpmailer/language/phpmailer.lang-sv.php26
17 files changed, 402 insertions, 83 deletions
diff --git a/lib/phpmailer/README.md b/lib/phpmailer/README.md
index 4eeecaf..c865a51 100644
--- a/lib/phpmailer/README.md
+++ b/lib/phpmailer/README.md
@@ -139,6 +139,16 @@ Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](h
If this isn't passing, is there something you can do to help?
+## Security
+
+Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately.
+
+PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer).
+
+PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a critical remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
+
+See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) for more detail on security issues.
+
## Contributing
Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
diff --git a/lib/phpmailer/VERSION b/lib/phpmailer/VERSION
index 56f1219..567eefa 100644
--- a/lib/phpmailer/VERSION
+++ b/lib/phpmailer/VERSION
@@ -1 +1 @@
-5.2.16 \ No newline at end of file
+5.2.21
diff --git a/lib/phpmailer/changelog.md b/lib/phpmailer/changelog.md
index 39b7c5a..a5bdd32 100644
--- a/lib/phpmailer/changelog.md
+++ b/lib/phpmailer/changelog.md
@@ -1,5 +1,32 @@
# ChangeLog
+## Version 5.2.21 (December 28th 2016)
+* Fix missed number update in version file - no functional changes
+
+## Version 5.2.20 (December 28th 2016)
+* **SECURITY** Critical security update for CVE-2016-10045 please update now! Thanks to [Dawid Golunski](https://legalhackers.com) and Paul Buonopane (@Zenexer).
+
+## Version 5.2.19 (December 26th 2016)
+* Minor cleanup
+
+## Version 5.2.18 (December 24th 2016)
+* **SECURITY** Critical security update for CVE-2016-10033 please update now! Thanks to [Dawid Golunski](https://legalhackers.com).
+* Add ability to extract the SMTP transaction ID from some common SMTP success messages
+* Minor documentation tweaks
+
+## Version 5.2.17 (December 9th 2016)
+* This is officially the last feature release of 5.2. Security fixes only from now on; use PHPMailer 6.0!
+* Allow DKIM private key to be provided as a string
+* Provide mechanism to allow overriding of boundary and message ID creation
+* Improve Brazilian Portuguese, Spanish, Swedish, Romanian, and German translations
+* PHP 7.1 support for Travis-CI
+* Fix some language codes
+* Add security notices
+* Improve DKIM compatibility in older PHP versions
+* Improve trapping and capture of SMTP connection errors
+* Improve passthrough of error levels for debug output
+* PHPDoc cleanup
+
## Version 5.2.16 (June 6th 2016)
* Added DKIM example
* Fixed empty additional_parameters problem
diff --git a/lib/phpmailer/class.phpmailer.php b/lib/phpmailer/class.phpmailer.php
index f9013eb..8ff13f1 100644
--- a/lib/phpmailer/class.phpmailer.php
+++ b/lib/phpmailer/class.phpmailer.php
@@ -31,7 +31,7 @@ class PHPMailer
* The PHPMailer Version number.
* @var string
*/
- public $Version = '5.2.16';
+ public $Version = '5.2.21';
/**
* Email priority.
@@ -201,6 +201,9 @@ class PHPMailer
/**
* An ID to be used in the Message-ID header.
* If empty, a unique id will be generated.
+ * You can set your own, but it must be in the format "<id@domain>",
+ * as defined in RFC5322 section 3.6.4 or it will be ignored.
+ * @see https://tools.ietf.org/html/rfc5322#section-3.6.4
* @var string
*/
public $MessageID = '';
@@ -421,6 +424,13 @@ class PHPMailer
public $DKIM_private = '';
/**
+ * DKIM private key string.
+ * If set, takes precedence over `$DKIM_private`.
+ * @var string
+ */
+ public $DKIM_private_string = '';
+
+ /**
* Callback Action function name.
*
* The function that handles the result of the send email action.
@@ -681,16 +691,16 @@ class PHPMailer
} else {
$subject = $this->encodeHeader($this->secureHeader($subject));
}
- //Can't use additional_parameters in safe_mode
+
+ //Can't use additional_parameters in safe_mode, calling mail() with null params breaks
//@link http://php.net/manual/en/function.mail.php
- if (ini_get('safe_mode') or !$this->UseSendmailOptions) {
+ if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) {
$result = @mail($to, $subject, $body, $header);
} else {
$result = @mail($to, $subject, $body, $header, $params);
}
return $result;
}
-
/**
* Output debugging info via user-defined method.
* Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
@@ -1284,9 +1294,11 @@ class PHPMailer
// Sign with DKIM if enabled
if (!empty($this->DKIM_domain)
- && !empty($this->DKIM_private)
&& !empty($this->DKIM_selector)
- && file_exists($this->DKIM_private)) {
+ && (!empty($this->DKIM_private_string)
+ || (!empty($this->DKIM_private) && file_exists($this->DKIM_private))
+ )
+ ) {
$header_dkim = $this->DKIM_Add(
$this->MIMEHeader . $this->mailHeader,
$this->encodeHeader($this->secureHeader($this->Subject)),
@@ -1352,19 +1364,24 @@ class PHPMailer
*/
protected function sendmailSend($header, $body)
{
- if ($this->Sender != '') {
+ // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
+ if (!empty($this->Sender) and self::isShellSafe($this->Sender)) {
if ($this->Mailer == 'qmail') {
- $sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
+ $sendmailFmt = '%s -f%s';
} else {
- $sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
+ $sendmailFmt = '%s -oi -f%s -t';
}
} else {
if ($this->Mailer == 'qmail') {
- $sendmail = sprintf('%s', escapeshellcmd($this->Sendmail));
+ $sendmailFmt = '%s';
} else {
- $sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail));
+ $sendmailFmt = '%s -oi -t';
}
}
+
+ // TODO: If possible, this should be changed to escapeshellarg. Needs thorough testing.
+ $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
+
if ($this->SingleTo) {
foreach ($this->SingleToArray as $toAddr) {
if (!@$mail = popen($sendmail, 'w')) {
@@ -1411,6 +1428,40 @@ class PHPMailer
}
/**
+ * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
+ *
+ * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
+ * @param string $string The string to be validated
+ * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
+ * @access protected
+ * @return boolean
+ */
+ protected static function isShellSafe($string)
+ {
+ // Future-proof
+ if (escapeshellcmd($string) !== $string
+ or !in_array(escapeshellarg($string), array("'$string'", "\"$string\""))
+ ) {
+ return false;
+ }
+
+ $length = strlen($string);
+
+ for ($i = 0; $i < $length; $i++) {
+ $c = $string[$i];
+
+ // All other characters have a special meaning in at least one common shell, including = and +.
+ // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here.
+ // Note that this does permit non-Latin alphanumeric characters based on the current locale.
+ if (!ctype_alnum($c) && strpos('@_-.', $c) === false) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
* Send mail using the PHP mail() function.
* @param string $header The message headers
* @param string $body The message body
@@ -1429,10 +1480,13 @@ class PHPMailer
$params = null;
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
- if (!empty($this->Sender)) {
- $params = sprintf('-f%s', $this->Sender);
+ if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
+ // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
+ if (self::isShellSafe($this->Sender)) {
+ $params = sprintf('-f%s', $this->Sender);
+ }
}
- if ($this->Sender != '' and !ini_get('safe_mode')) {
+ if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) {
$old_from = ini_get('sendmail_from');
ini_set('sendmail_from', $this->Sender);
}
@@ -1486,10 +1540,10 @@ class PHPMailer
if (!$this->smtpConnect($this->SMTPOptions)) {
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
}
- if ('' == $this->Sender) {
- $smtp_from = $this->From;
- } else {
+ if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
$smtp_from = $this->Sender;
+ } else {
+ $smtp_from = $this->From;
}
if (!$this->smtp->mail($smtp_from)) {
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
@@ -1681,6 +1735,19 @@ class PHPMailer
*/
public function setLanguage($langcode = 'en', $lang_path = '')
{
+ // Backwards compatibility for renamed language codes
+ $renamed_langcodes = array(
+ 'br' => 'pt_br',
+ 'cz' => 'cs',
+ 'dk' => 'da',
+ 'no' => 'nb',
+ 'se' => 'sv',
+ );
+
+ if (isset($renamed_langcodes[$langcode])) {
+ $langcode = $renamed_langcodes[$langcode];
+ }
+
// Define full set of translatable strings in English
$PHPMAILER_LANG = array(
'authenticate' => 'SMTP Error: Could not authenticate.',
@@ -1707,6 +1774,10 @@ class PHPMailer
// Calculate an absolute path so it can work if CWD is not here
$lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR;
}
+ //Validate $langcode
+ if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
+ $langcode = 'en';
+ }
$foundlang = true;
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
// There is no English translation file
@@ -2000,6 +2071,8 @@ class PHPMailer
$result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));
}
+ // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
+ // https://tools.ietf.org/html/rfc5322#section-3.6.4
if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) {
$this->lastMessageID = $this->MessageID;
} else {
@@ -2106,6 +2179,14 @@ class PHPMailer
}
/**
+ * Create unique ID
+ * @return string
+ */
+ protected function generateId() {
+ return md5(uniqid(time()));
+ }
+
+ /**
* Assemble the message body.
* Returns an empty string on failure.
* @access public
@@ -2116,7 +2197,7 @@ class PHPMailer
{
$body = '';
//Create unique IDs and preset boundaries
- $this->uniqueid = md5(uniqid(time()));
+ $this->uniqueid = $this->generateId();
$this->boundary[1] = 'b1_' . $this->uniqueid;
$this->boundary[2] = 'b2_' . $this->uniqueid;
$this->boundary[3] = 'b3_' . $this->uniqueid;
@@ -3296,16 +3377,18 @@ class PHPMailer
}
/**
- * Create a message from an HTML string.
- * Automatically makes modifications for inline images and backgrounds
- * and creates a plain-text version by converting the HTML.
- * Overwrites any existing values in $this->Body and $this->AltBody
+ * Create a message body from an HTML string.
+ * Automatically inlines images and creates a plain-text version by converting the HTML,
+ * overwriting any existing values in Body and AltBody.
+ * $basedir is used when handling relative image paths, e.g. <img src="images/a.png">
+ * will look for an image file in $basedir/images/a.png and convert it to inline.
+ * If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself.
* @access public
* @param string $message HTML message string
- * @param string $basedir baseline directory for path
+ * @param string $basedir base directory for relative paths to images
* @param boolean|callable $advanced Whether to use the internal HTML to text converter
* or your own custom converter @see PHPMailer::html2text()
- * @return string $message
+ * @return string $message The transformed message Body
*/
public function msgHTML($message, $basedir = '', $advanced = false)
{
@@ -3375,7 +3458,7 @@ class PHPMailer
* Convert an HTML string into plain text.
* This is used by msgHTML().
* Note - older versions of this function used a bundled advanced converter
- * which was been removed for license reasons in #232
+ * which was been removed for license reasons in #232.
* Example usage:
* <code>
* // Use default conversion
@@ -3675,7 +3758,7 @@ class PHPMailer
* @access public
* @param string $signHeader
* @throws phpmailerException
- * @return string
+ * @return string The DKIM signature value
*/
public function DKIM_Sign($signHeader)
{
@@ -3685,15 +3768,33 @@ class PHPMailer
}
return '';
}
- $privKeyStr = file_get_contents($this->DKIM_private);
- if ($this->DKIM_passphrase != '') {
+ $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private);
+ if ('' != $this->DKIM_passphrase) {
$privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
} else {
$privKey = openssl_pkey_get_private($privKeyStr);
}
- if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { //sha1WithRSAEncryption
- openssl_pkey_free($privKey);
- return base64_encode($signature);
+ //Workaround for missing digest algorithms in old PHP & OpenSSL versions
+ //@link http://stackoverflow.com/a/11117338/333340
+ if (version_compare(PHP_VERSION, '5.3.0') >= 0 and
+ in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) {
+ if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
+ openssl_pkey_free($privKey);
+ return base64_encode($signature);
+ }
+ } else {
+ $pinfo = openssl_pkey_get_details($privKey);
+ $hash = hash('sha256', $signHeader);
+ //'Magic' constant for SHA256 from RFC3447
+ //@link https://tools.ietf.org/html/rfc3447#page-43
+ $t = '3031300d060960864801650304020105000420' . $hash;
+ $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3);
+ $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t);
+
+ if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) {
+ openssl_pkey_free($privKey);
+ return base64_encode($signature);
+ }
}
openssl_pkey_free($privKey);
return '';
diff --git a/lib/phpmailer/class.phpmaileroauth.php b/lib/phpmailer/class.phpmaileroauth.php
index f9cd7b4..b1bb09f 100644
--- a/lib/phpmailer/class.phpmaileroauth.php
+++ b/lib/phpmailer/class.phpmaileroauth.php
@@ -80,6 +80,7 @@ class PHPMailerOAuth extends PHPMailer
* @uses SMTP
* @access public
* @return bool
+ * @throws phpmailerException
*/
public function smtpConnect($options = array())
{
diff --git a/lib/phpmailer/class.pop3.php b/lib/phpmailer/class.pop3.php
index 56ad1bf..373c886 100644
--- a/lib/phpmailer/class.pop3.php
+++ b/lib/phpmailer/class.pop3.php
@@ -34,7 +34,7 @@ class POP3
* @var string
* @access public
*/
- public $Version = '5.2.16';
+ public $Version = '5.2.21';
/**
* Default POP3 port number.
diff --git a/lib/phpmailer/class.smtp.php b/lib/phpmailer/class.smtp.php
index 0c016f1..270162b 100644
--- a/lib/phpmailer/class.smtp.php
+++ b/lib/phpmailer/class.smtp.php
@@ -30,7 +30,7 @@ class SMTP
* The PHPMailer SMTP version number.
* @var string
*/
- const VERSION = '5.2.16';
+ const VERSION = '5.2.21';
/**
* SMTP line break constant.
@@ -81,7 +81,7 @@ class SMTP
* @deprecated Use the `VERSION` constant instead
* @see SMTP::VERSION
*/
- public $Version = '5.2.16';
+ public $Version = '5.2.21';
/**
* SMTP server port number.
@@ -150,6 +150,17 @@ class SMTP
*/
public $Timelimit = 300;
+ /**
+ * @var array patterns to extract smtp transaction id from smtp reply
+ * Only first capture group will be use, use non-capturing group to deal with it
+ * Extend this class to override this property to fulfil your needs.
+ */
+ protected $smtp_transaction_id_patterns = array(
+ 'exim' => '/[0-9]{3} OK id=(.*)/',
+ 'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/',
+ 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
+ );
+
/**
* The socket for the server connection.
* @var resource
@@ -206,7 +217,7 @@ class SMTP
}
//Avoid clash with built-in function names
if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {
- call_user_func($this->Debugoutput, $str, $this->do_debug);
+ call_user_func($this->Debugoutput, $str, $level);
return;
}
switch ($this->Debugoutput) {
@@ -272,8 +283,8 @@ class SMTP
$errstr = '';
if ($streamok) {
$socket_context = stream_context_create($options);
- //Suppress errors; connection failures are handled at a higher level
- $this->smtp_conn = @stream_socket_client(
+ set_error_handler(array($this, 'errorHandler'));
+ $this->smtp_conn = stream_socket_client(
$host . ":" . $port,
$errno,
$errstr,
@@ -281,12 +292,14 @@ class SMTP
STREAM_CLIENT_CONNECT,
$socket_context
);
+ restore_error_handler();
} else {
//Fall back to fsockopen which should work in more places, but is missing some features
$this->edebug(
"Connection: stream_socket_client not available, falling back to fsockopen",
self::DEBUG_CONNECTION
);
+ set_error_handler(array($this, 'errorHandler'));
$this->smtp_conn = fsockopen(
$host,
$port,
@@ -294,6 +307,7 @@ class SMTP
$errstr,
$timeout
);
+ restore_error_handler();
}
// Verify we connected properly
if (!is_resource($this->smtp_conn)) {
@@ -474,7 +488,7 @@ class SMTP
$temp = new stdClass;
$ntlm_client = new ntlm_sasl_client_class;
//Check that functions are available
- if (!$ntlm_client->Initialize($temp)) {
+ if (!$ntlm_client->initialize($temp)) {
$this->setError($temp->error);
$this->edebug(
'You need to enable some modules in your php.ini file: '
@@ -484,7 +498,7 @@ class SMTP
return false;
}
//msg1
- $msg1 = $ntlm_client->TypeMsg1($realm, $workstation); //msg1
+ $msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1
if (!$this->sendCommand(
'AUTH NTLM',
@@ -503,7 +517,7 @@ class SMTP
$password
);
//msg3
- $msg3 = $ntlm_client->TypeMsg3(
+ $msg3 = $ntlm_client->typeMsg3(
$ntlm_res,
$username,
$realm,
@@ -1189,4 +1203,47 @@ class SMTP
{
return $this->Timeout;
}
+
+ /**
+ * Reports an error number and string.
+ * @param integer $errno The error number returned by PHP.
+ * @param string $errmsg The error message returned by PHP.
+ */
+ protected function errorHandler($errno, $errmsg)
+ {
+ $notice = 'Connection: Failed to connect to server.';
+ $this->setError(
+ $notice,
+ $errno,
+ $errmsg
+ );
+ $this->edebug(
+ $notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg,
+ self::DEBUG_CONNECTION
+ );
+ }
+
+ /**
+ * Will return the ID of the last smtp transaction based on a list of patterns provided
+ * in SMTP::$smtp_transaction_id_patterns.
+ * If no reply has been received yet, it will return null.
+ * If no pattern has been matched, it will return false.
+ * @return bool|null|string
+ */
+ public function getLastTransactionID()
+ {
+ $reply = $this->getLastReply();
+
+ if (empty($reply)) {
+ return null;
+ }
+
+ foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
+ if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
+ return $matches[1];
+ }
+ }
+
+ return false;
+ }
}
diff --git a/lib/phpmailer/extras/htmlfilter.php b/lib/phpmailer/extras/htmlfilter.php
index 5ac7d13..7727487 100644
--- a/lib/phpmailer/extras/htmlfilter.php
+++ b/lib/phpmailer/extras/htmlfilter.php
@@ -461,7 +461,6 @@ function tln_deent(&$attvalue, $regex, $hex = false)
* checks on them.
*
* @param string $attvalue A string to run entity check against.
- * @return Void, modifies a reference value.
*/
function tln_defang(&$attvalue)
{
@@ -488,7 +487,6 @@ function tln_defang(&$attvalue)
* be funny to make "java[tab]script" be just as good as "javascript".
*
* @param string $attvalue The attribute value before extraneous spaces removed.
- * @return Void, modifies a reference value.
*/
function tln_unspace(&$attvalue)
{
@@ -511,7 +509,7 @@ function tln_unspace(&$attvalue)
* @param array $add_attr_to_tag See description for tln_sanitize
* @param string $trans_image_path
* @param boolean $block_external_images
- * @return Array with modified attributes.
+ * @return array with modified attributes.
*/
function tln_fixatts(
$tagname,
@@ -667,9 +665,7 @@ function tln_fixurl($attname, &$attvalue, $trans_image_path, $block_external_ima
function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
{
- $me = 'tln_fixstyle';
// workaround for </style> in between comments
- $iCurrentPos = $pos;
$content = '';
$sToken = '';
$bSucces = false;
@@ -740,8 +736,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
*/
$content = preg_replace("|body(\s*\{.*?\})|si", ".bodyclass\\1", $content);
- $trans_image_path = $trans_image_path;
-
/**
* Fix url('blah') declarations.
*/
@@ -796,7 +790,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
function tln_body2div($attary, $trans_image_path)
{
- $me = 'tln_body2div';
$divattary = array('class' => "'bodyclass'");
$text = '#000000';
$has_bgc_stl = $has_txt_stl = false;
@@ -901,7 +894,7 @@ function tln_sanitize(
}
$trusted .= tln_tagprint($tagname, $attary, $tagtype);
$trusted .= $free_content;
- $trusted .= tln_tagprint($tagname, false, 2);
+ $trusted .= tln_tagprint($tagname, null, 2);
}
continue;
}
diff --git a/lib/phpmailer/extras/ntlm_sasl_client.php b/lib/phpmailer/extras/ntlm_sasl_client.php
index 4a08561..3fd5392 100644
--- a/lib/phpmailer/extras/ntlm_sasl_client.php
+++ b/lib/phpmailer/extras/ntlm_sasl_client.php
@@ -160,12 +160,12 @@ class ntlm_sasl_client_class
{
switch ($this->state) {
case SASL_NTLM_STATE_IDENTIFY_DOMAIN:
- $message = $this->TypeMsg1($this->credentials["realm"], $this->credentials["workstation"]);
+ $message = $this->typeMsg1($this->credentials["realm"], $this->credentials["workstation"]);
$this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE;
break;
case SASL_NTLM_STATE_RESPOND_CHALLENGE:
$ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]);
- $message = $this->TypeMsg3(
+ $message = $this->typeMsg3(
$ntlm_response,
$this->credentials["user"],
$this->credentials["realm"],
diff --git a/lib/phpmailer/language/phpmailer.lang-cs.php b/lib/phpmailer/language/phpmailer.lang-cs.php
new file mode 100644
index 0000000..8cb1a3d
--- /dev/null
+++ b/lib/phpmailer/language/phpmailer.lang-cs.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Czech PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'Chyba SMTP: Autentizace selhala.';
+$PHPMAILER_LANG['connect_host'] = 'Chyba SMTP: Nelze navázat spojení se SMTP serverem.';
+$PHPMAILER_LANG['data_not_accepted'] = 'Chyba SMTP: Data nebyla přijata.';
+$PHPMAILER_LANG['empty_message'] = 'Prázdné tělo zprávy';
+$PHPMAILER_LANG['encoding'] = 'Neznámé kódování: ';
+$PHPMAILER_LANG['execute'] = 'Nelze provést: ';
+$PHPMAILER_LANG['file_access'] = 'Nelze získat přístup k souboru: ';
+$PHPMAILER_LANG['file_open'] = 'Chyba souboru: Nelze otevřít soubor pro čtení: ';
+$PHPMAILER_LANG['from_failed'] = 'Následující adresa odesílatele je nesprávná: ';
+$PHPMAILER_LANG['instantiate'] = 'Nelze vytvořit instanci emailové funkce.';
+$PHPMAILER_LANG['invalid_address'] = 'Neplatná adresa: ';
+$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';
+$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';
+$PHPMAILER_LANG['recipients_failed'] = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';
+$PHPMAILER_LANG['signing'] = 'Chyba přihlašování: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() selhal.';
+$PHPMAILER_LANG['smtp_error'] = 'Chyba SMTP serveru: ';
+$PHPMAILER_LANG['variable_set'] = 'Nelze nastavit nebo změnit proměnnou: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/lib/phpmailer/language/phpmailer.lang-da.php b/lib/phpmailer/language/phpmailer.lang-da.php
new file mode 100644
index 0000000..e725f4b
--- /dev/null
+++ b/lib/phpmailer/language/phpmailer.lang-da.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Danish PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author Mikael Stokkebro <info@stokkebro.dk>
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
+$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
+//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
+$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
+$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
+$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
+$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
+$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
+$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
+//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
+$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
+$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
+//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
+//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
+//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
+//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/lib/phpmailer/language/phpmailer.lang-de.php b/lib/phpmailer/language/phpmailer.lang-de.php
index 43057ef..aa987a9 100644
--- a/lib/phpmailer/language/phpmailer.lang-de.php
+++ b/lib/phpmailer/language/phpmailer.lang-de.php
@@ -4,22 +4,22 @@
* @package PHPMailer
*/
-$PHPMAILER_LANG['authenticate'] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Fehler: Daten werden nicht akzeptiert.';
-$PHPMAILER_LANG['empty_message'] = 'E-Mail Inhalt ist leer.';
-$PHPMAILER_LANG['encoding'] = 'Unbekanntes Encoding-Format: ';
+$PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
+$PHPMAILER_LANG['connect_host'] = 'SMTP-Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-Fehler: Daten werden nicht akzeptiert.';
+$PHPMAILER_LANG['empty_message'] = 'E-Mail-Inhalt ist leer.';
+$PHPMAILER_LANG['encoding'] = 'Unbekannte Kodierung: ';
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
-$PHPMAILER_LANG['file_open'] = 'Datei Fehler: konnte folgende Datei nicht öffnen: ';
+$PHPMAILER_LANG['file_open'] = 'Dateifehler: Konnte folgende Datei nicht öffnen: ';
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
-$PHPMAILER_LANG['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.';
-$PHPMAILER_LANG['invalid_address'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig: ';
+$PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
+$PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
-$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ';
+$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfängeradresse an.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.';
-$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zum SMTP-Server fehlgeschlagen.';
+$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP-Server: ';
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
+$PHPMAILER_LANG['extension_missing'] = 'Fehlende Erweiterung: ';
diff --git a/lib/phpmailer/language/phpmailer.lang-es.php b/lib/phpmailer/language/phpmailer.lang-es.php
index 5ef716e..d2eac8d 100644
--- a/lib/phpmailer/language/phpmailer.lang-es.php
+++ b/lib/phpmailer/language/phpmailer.lang-es.php
@@ -23,4 +23,4 @@ $PHPMAILER_LANG['signing'] = 'Error al firmar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
+$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
diff --git a/lib/phpmailer/language/phpmailer.lang-nb.php b/lib/phpmailer/language/phpmailer.lang-nb.php
new file mode 100644
index 0000000..383dd51
--- /dev/null
+++ b/lib/phpmailer/language/phpmailer.lang-nb.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Norwegian PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
+$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Data ble ikke akseptert.';
+$PHPMAILER_LANG['empty_message'] = 'Meldingsinnholdet er tomt';
+$PHPMAILER_LANG['encoding'] = 'Ukjent tegnkoding: ';
+$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
+$PHPMAILER_LANG['file_access'] = 'Får ikke tilgang til filen: ';
+$PHPMAILER_LANG['file_open'] = 'Fil feil: Kunne ikke åpne filen: ';
+$PHPMAILER_LANG['from_failed'] = 'Følgende avsenderadresse feilet: ';
+$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere mailfunksjonen.';
+$PHPMAILER_LANG['invalid_address'] = 'Meldingen ble ikke sendt, følgende adresse er ugyldig: ';
+$PHPMAILER_LANG['provide_address'] = 'Du må angi minst en mottakeradresse.';
+$PHPMAILER_LANG['mailer_not_supported'] = ' mailer er ikke supportert.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottagere feilet: ';
+$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() feilet.';
+$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
+$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/lib/phpmailer/language/phpmailer.lang-pt_br.php b/lib/phpmailer/language/phpmailer.lang-pt_br.php
new file mode 100644
index 0000000..fecbbe3
--- /dev/null
+++ b/lib/phpmailer/language/phpmailer.lang-pt_br.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author Paulo Henrique Garcia <paulo@controllerweb.com.br>
+ * @author Lucas Guimarães <lucas@lucasguimaraes.com>
+ * @author Phelipe Alves <phelipealvesdesouza@gmail.com>
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
+$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.';
+$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
+$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia';
+$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
+$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
+$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
+$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
+$PHPMAILER_LANG['from_failed'] = 'Os seguintes remententes falharam: ';
+$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
+$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
+$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
+$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.';
+$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: ';
+$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
+$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
+$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
+$PHPMAILER_LANG['extension_missing'] = 'Extensão ausente: ';
diff --git a/lib/phpmailer/language/phpmailer.lang-ro.php b/lib/phpmailer/language/phpmailer.lang-ro.php
index cf37cc1..fa100ea 100644
--- a/lib/phpmailer/language/phpmailer.lang-ro.php
+++ b/lib/phpmailer/language/phpmailer.lang-ro.php
@@ -2,25 +2,25 @@
/**
* Romanian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
- * @author Catalin Constantin <catalin@dazoot.ro>
+ * @author Alex Florea <alecz.fia@gmail.com>
*/
-$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Nu a functionat autentificarea.';
-$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.';
+$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.';
+$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';
+$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.';
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
-$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: ';
-$PHPMAILER_LANG['execute'] = 'Nu pot executa: ';
-$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: ';
-$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: ';
-$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: ';
-$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.';
-$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este valida: ';
+$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: ';
+$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: ';
+$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: ';
+$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: ';
+$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: ';
+$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.';
+$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
-$PHPMAILER_LANG['provide_address'] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).';
-$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: ';
-$PHPMAILER_LANG['signing'] = 'A aparut o problema la semnarea emailului. ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a esuat.';
-$PHPMAILER_LANG['smtp_error'] = 'A aparut o eroare la serverul SMTP. ';
+$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.';
+$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';
+$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.';
+$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
+$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
diff --git a/lib/phpmailer/language/phpmailer.lang-sv.php b/lib/phpmailer/language/phpmailer.lang-sv.php
new file mode 100644
index 0000000..4408e63
--- /dev/null
+++ b/lib/phpmailer/language/phpmailer.lang-sv.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Swedish PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author Johan Linnér <johan@linner.biz>
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.';
+$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.';
+//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
+$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: ';
+$PHPMAILER_LANG['execute'] = 'Kunde inte köra: ';
+$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: ';
+$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: ';
+$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: ';
+$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.';
+$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: ';
+$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
+$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
+$PHPMAILER_LANG['signing'] = 'Signerings fel: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.';
+$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: ';
+$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: ';
+$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: ';