Skip to content

Commit 2439db3

Browse files
authored
Fix 2660 (hestiacp#2661)
* Fix 2660 * Make field read only for not admin users
1 parent d671204 commit 2439db3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web/login/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function authenticate_user($user, $password, $twofa = '')
132132
if ($method == 'yescrypt') {
133133
$v_password = tempnam("/tmp", "vst");
134134
$fp = fopen($v_password, "w");
135-
fwrite($fp, $_POST['password']."\n");
135+
fwrite($fp, $password."\n");
136136
fclose($fp);
137137
exec(HESTIA_CMD . 'v-check-user-password '. $v_user.' '. $v_password. ' '.$v_ip.' yes', $output, $return_var);
138138
$hash = $output[0];

web/templates/pages/edit_mail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
</tr>
9292
<tr>
9393
<td>
94-
<input type="text" size="20" class="vst-input" name="v_rate" value="<?=htmlentities(trim($v_rate, "'"))?>">
94+
<input type="text" size="20" class="vst-input" name="v_rate" value="<?=htmlentities(trim($v_rate, "'"))?>" <?php if($_SESSION['userContext'] != "admin"){ echo "disabled";}?>>>
9595
</td>
9696
</tr>
9797
<?php if (!empty($_SESSION['ANTISPAM_SYSTEM'])) {?>

0 commit comments

Comments
 (0)