SMTP port isn't set when no SMTP user is specified

Bug #1713441 reported by Alendit-0
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

Hello,

Mahara does not set a custom SMTP port in case no SMTP user name is specified.

The fix is trivial: in file lib/user.php move line 762 to 756, so the port is set right after setting the host outside of if-clause.

Cheers,
Dimitri.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Thanks for the suggested fix, Dimitry. We'll take a look.

BTW, if you want to submit code changes yourself, you can do so into our code review system. Please see https://wiki.mahara.org/wiki/Developer_Area/Contributing_Code

Cheers
Kristina

Changed in mahara:
importance: Undecided → Medium
milestone: none → 18.04.0
status: New → Confirmed
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

smtp library allows to define the port as part of the host using this format: [hostname:port]. If it's done this way, it will not use the port specified 'smtpport' in Mahara configuration. In this case, we don't have any issue.

But in the case the host doesn't include the port, then the 'smtpport' in Mahara configuration is used.

So in the case we have the port not defined in 'smtphosts' but in 'smtpport', and we don't have the 'smtpuser' value set, then the port is ignored by Mahara and it's not what we want. I think the fix proposed here is correct.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8158

Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8158
Committed: https://git.mahara.org/mahara/mahara/commit/0630b4c679f0a6a7fd1d1626058cbe320753528c
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 0630b4c679f0a6a7fd1d1626058cbe320753528c
Author: Dimitri <email address hidden>
Date: Thu Oct 19 12:01:16 2017 +1300

Bug 1713441: set a custom SMTP port in case no SMTP user name is specified

behatnotneeded

Change-Id: Id1a1d1e99d58b9b2c3567ee36eebaeb70c9944e6

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "17.10_STABLE" branch: https://reviews.mahara.org/8179

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8179
Committed: https://git.mahara.org/mahara/mahara/commit/5f39e8f06dde94dc1132318fad207323d8877580
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit 5f39e8f06dde94dc1132318fad207323d8877580
Author: Dimitri <email address hidden>
Date: Thu Oct 19 12:01:16 2017 +1300

Bug 1713441: set a custom SMTP port in case no SMTP user name is specified

behatnotneeded

Change-Id: Id1a1d1e99d58b9b2c3567ee36eebaeb70c9944e6
(cherry picked from commit 0630b4c679f0a6a7fd1d1626058cbe320753528c)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 18.04.0 → 17.10.0
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.