Skip to content

Commit 62ad030

Browse files
authored
Do not send the smtppass on test if field is disabled (#31724)
1 parent 12830b3 commit 62ad030

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

media/system/js/sendtestmail-uncompressed.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ var sendTestMail = function ()
1414
var email_data = {
1515
smtpauth : $('input[name="jform[smtpauth]"]:checked').val(),
1616
smtpuser : $('input[name="jform[smtpuser]"]').val(),
17-
smtppass : $('input[name="jform[smtppass]"]').val(),
1817
smtphost : $('input[name="jform[smtphost]"]').val(),
1918
smtpsecure: $('select[name="jform[smtpsecure]"]').val(),
2019
smtpport : $('input[name="jform[smtpport]"]').val(),
@@ -24,6 +23,12 @@ var sendTestMail = function ()
2423
mailonline: $('input[name="jform[mailonline]"]:checked').val()
2524
};
2625

26+
var $smtppass = $('input[name="jform[smtppass]"]');
27+
28+
if ($smtppass.is(':disabled') === false) {
29+
email_data.smtppass = $smtppass.val();
30+
}
31+
2732
// Remove js messages, if they exist.
2833
Joomla.removeMessages();
2934

media/system/js/sendtestmail.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)