1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 21:21:54 +02:00

Improvements to Preferences SMTP form validation

SMTP server max string length increased from 50 to 128
SMTP username max string length increased from 50 to 128
SMTP password max string length increased from 50 to 128

SMTP password is actually optional now, as intended

SMTP password now accepts spaces

SMTP password needs to be at least 4 characters long

Autocomplete disabled for Firefox 38+, Chrome 34+, and Internet Explorer 11+

Fixes: 
This commit is contained in:
Nick Liu 2018-01-24 04:40:09 -06:00
parent a397b80640
commit 02d026a28f
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

@ -2141,17 +2141,17 @@ class mailoutAdminClass extends e107MailManager
$text .= "
<tr>
<td>".LAN_MAILOUT_87.":&nbsp;&nbsp;</td>
<td>".$frm->text('smtp_server',$pref['smtp_server'], 50, array('size'=>'xxlarge'))."</td>
<td>".$frm->text('smtp_server',$pref['smtp_server'], 128, array('size'=>'xxlarge'))."</td>
</tr>
<tr>
<td>".LAN_MAILOUT_88.":</td>
<td style='width:50%;' >".$frm->text('smtp_username',$pref['smtp_username'], 50, array('size'=>'xxlarge', 'placeholder'=>"(".LAN_OPTIONAL.")"))."</td>
<td style='width:50%;' >".$frm->text('smtp_username',$pref['smtp_username'], 128, array('size'=>'xxlarge', 'placeholder'=>"(".LAN_OPTIONAL.")"))."</td>
</tr>
<tr>
<td>".LAN_MAILOUT_89.":</td>
<td>".$frm->password('smtp_password',$pref['smtp_password'], 50, array('size'=>'xxlarge', 'placeholder'=>"(".LAN_OPTIONAL.")"))."
<td>".$frm->password('smtp_password',$pref['smtp_password'], 128, array('size'=>'xxlarge', 'required'=>false, 'pattern'=>'.{4,}', 'placeholder'=>"(".LAN_OPTIONAL.")", 'autocomplete'=>'new-password'))."
</td>
</tr>