substr incorrect for TLS

Discuss bugs related to Logic Invoice.
andyg2
Posts: 10
Joined: Tue Jul 26, 2016 7:08 pm

substr incorrect for TLS

Postby andyg2 » Tue Jul 26, 2016 7:20 pm

I noticed the substr was removing 6 characters for tls mail server addresses, where it should be only 4 in: `tls:host.mailserver.com`
/upload/system/library/mail.php
Line 166

Change

Code: Select all

$hostname = $is_tls ? substr($this->smtp_hostname, 6) : $this->smtp_hostname;

To

Code: Select all

$hostname = $is_tls ? substr($this->smtp_hostname, 4) : $this->smtp_hostname;

User avatar
Esmond
Site Admin
Posts: 241
Joined: Tue Sep 15, 2015 3:08 pm
Location: Singapore
Contact:

Re: substr incorrect for TLS

Postby Esmond » Tue Jul 26, 2016 8:09 pm

It should be tls:// and not tls:

andyg2
Posts: 10
Joined: Tue Jul 26, 2016 7:08 pm

Re: substr incorrect for TLS

Postby andyg2 » Tue Jul 26, 2016 8:57 pm

Aha!!! That is horrendously obvious - facepalm
Thanks :)


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest