summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_pptp_users_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-03-10 22:55:39 +0545
committerPhil Davis <phil.davis@inf.org>2015-03-10 22:55:39 +0545
commit67877234553c37cb10019d2d3d519b6435517aeb (patch)
tree1c955f34ac5d36acd8d8695ba9015836a24957d5 /usr/local/www/vpn_pptp_users_edit.php
parent6127c541cc84fab64acc6a447905b11517725086 (diff)
downloadpfsense-67877234553c37cb10019d2d3d519b6435517aeb.zip
pfsense-67877234553c37cb10019d2d3d519b6435517aeb.tar.gz
Fix password box cursor position
Similar to https://github.com/pfsense/pfsense/commit/dedc40f7ded5f88aee4720aa8a3a57667b975254 The password field shows the little lock icon, but the text input area starts over the top of the icon and as I type in the field the password "dots" go over the lock icon in each of these data entry places. Changing the field name/id to not be "password" but to be "passwordfld", "passwordfld1" "passwordfld2" and the like fixes it. Something does not like the field being called just "password". In interfaces.php I also changed the field "username" to be "ppp_username". This standardized it to work in a similar way to pppoe_username pptp_username fields. It looks easier to understand for me.
Diffstat (limited to 'usr/local/www/vpn_pptp_users_edit.php')
-rw-r--r--usr/local/www/vpn_pptp_users_edit.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/local/www/vpn_pptp_users_edit.php b/usr/local/www/vpn_pptp_users_edit.php
index 936ac20..8b09a7f 100644
--- a/usr/local/www/vpn_pptp_users_edit.php
+++ b/usr/local/www/vpn_pptp_users_edit.php
@@ -78,7 +78,7 @@ if ($_POST) {
$reqdfields = explode(" ", "username");
$reqdfieldsn = array(gettext("Username"));
} else {
- $reqdfields = explode(" ", "username password");
+ $reqdfields = explode(" ", "username passwordfld1");
$reqdfieldsn = array(gettext("Username"),gettext("Password"));
}
@@ -87,13 +87,13 @@ if ($_POST) {
if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['username']))
$input_errors[] = gettext("The username contains invalid characters.");
- if (preg_match("/^!/", $_POST['password']))
+ if (preg_match("/^!/", $_POST['passwordfld1']))
$input_errors[] = gettext("The password cannot start with '!'.");
- if (!preg_match("/^[\x20-\x7E]*$/", $_POST['password']))
+ if (!preg_match("/^[\x20-\x7E]*$/", $_POST['passwordfld1']))
$input_errors[] = gettext("The password contains invalid characters.");
- if (($_POST['password']) && ($_POST['password'] != $_POST['password2'])) {
+ if (($_POST['passwordfld1']) && ($_POST['passwordfld1'] != $_POST['passwordfld2'])) {
$input_errors[] = gettext("The passwords do not match.");
}
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
@@ -118,8 +118,8 @@ if ($_POST) {
$secretent['name'] = $_POST['username'];
$secretent['ip'] = $_POST['ip'];
- if ($_POST['password'])
- $secretent['password'] = $_POST['password'];
+ if ($_POST['passwordfld1'])
+ $secretent['password'] = $_POST['passwordfld1'];
if (isset($id) && $a_secret[$id])
$a_secret[$id] = $secretent;
@@ -155,8 +155,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="password" type="password" class="formfld pwd" id="password" size="20" />
- <br /><?=$mandfldhtml;?><input name="password2" type="password" class="formfld pwd" id="password2" size="20" />
+ <?=$mandfldhtml;?><input name="passwordfld1" type="password" class="formfld pwd" id="passwordfld1" size="20" />
+ <br /><?=$mandfldhtml;?><input name="passwordfld2" type="password" class="formfld pwd" id="passwordfld2" size="20" />
&nbsp;(<?=gettext("confirmation");?>)<?php if (isset($id) && $a_secret[$id]): ?><br />
<span class="vexpl"><?=gettext("If you want to change the users' password, ".
"enter it here twice.");?></span><?php endif; ?></td>
OpenPOWER on IntegriCloud