try to fix bug #1075: don't use ****** as a special password

This commit is contained in:
Antoine Beaupré 2007-10-26 04:44:53 +00:00
parent b17f518ffe
commit ec8692ca09
2 changed files with 3 additions and 3 deletions

View File

@ -55,8 +55,8 @@ include("head.php");
<label for="login"><?php __("Username"); ?></label></th><td> <label for="login"><?php __("Username"); ?></label></th><td>
<select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select>&nbsp;<b>_</b>&nbsp;<input type="text" class="int" name="login" id="login" value="<?php echo $r["login"]; ?>" size="20" maxlength="64" /> <select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select>&nbsp;<b>_</b>&nbsp;<input type="text" class="int" name="login" id="login" value="<?php echo $r["login"]; ?>" size="20" maxlength="64" />
</td></tr> </td></tr>
<tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="password" class="int" name="pass" id="pass" size="20" maxlength="64" value="********"/></td></tr> <tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="password" class="int" name="pass" id="pass" size="20" maxlength="64" value=""/></td></tr>
<tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" size="20" maxlength="64" value="********"/></td></tr> <tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" size="20" maxlength="64" value=""/></td></tr>
<tr><th><label for="rep"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="rep" id="rep" value="<?php echo $r["dir"]; ?>" size="20" maxlength="64" /> <tr><th><label for="rep"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="rep" id="rep" value="<?php echo $r["dir"]; ?>" size="20" maxlength="64" />
<script type="text/javascript"> <script type="text/javascript">

View File

@ -186,7 +186,7 @@ class m_ftp {
$err->raise("ftp",6); $err->raise("ftp",6);
return false; return false;
} }
if (trim($pass)!="********") { if (trim($pass)) {
$db->query("UPDATE ftpusers SET name='".$prefixe.$login."', password='', encrypted_password=ENCRYPT('$pass'), homedir='/var/alternc/html/$l/$lo/$dir', uid='$cuid' WHERE id='$id';"); $db->query("UPDATE ftpusers SET name='".$prefixe.$login."', password='', encrypted_password=ENCRYPT('$pass'), homedir='/var/alternc/html/$l/$lo/$dir', uid='$cuid' WHERE id='$id';");
} else { } else {
$db->query("UPDATE ftpusers SET name='".$prefixe.$login."', homedir='/var/alternc/html/$l/$lo/$dir', uid='$cuid' WHERE id='$id';"); $db->query("UPDATE ftpusers SET name='".$prefixe.$login."', homedir='/var/alternc/html/$l/$lo/$dir', uid='$cuid' WHERE id='$id';");