You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test SMTP connection fails when no port is specified #41643
I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
admin/api
Describe the bug
This is a regression created by #39486. When no port is specified the condition added for that issue incorrectly compares the empty string "" with the port 25. Check this line. Therefore the test thinks that the server is different (different port) and the password is not recovered from the configuration. This finishes with a login error instead of a successful test.
The root cause seems to be that the port is sent by the console as null (in json "port": null) and that makes settings.getOrDefault("port", "25") return null. So I will use Optional or similar.
The easy workaround is just specify the default port to 25 in the admin console.
Version
26.3.2
Regression
The issue is a regression
Expected behavior
The test should work OK.
Actual behavior
Test fails with incorrect password as the password is not recovered from the configuration.
How to Reproduce?
Just configure a SMTP server in default port 25 without specifying it in teh configuration. After saving , reload the smtp config and test again. It will fail with invalid credentials.
Activity
Use Optional instead of getOrDefault for settings in testSMTPConnection
5 remaining items
Use Optional instead of getOrDefault for settings in testSMTPConnection
Use Optional instead of getOrDefault for settings in testSMTPConnection
Use Optional instead of getOrDefault for settings in testSMTPConnection
Use Optional instead of getOrDefault for settings in testSMTPConnection
Use Optional instead of getOrDefault for settings in testSMTPConnection
Use Optional instead of getOrDefault for settings in testSMTPConnection