Commit e77c9d9
authored
Nitpicking bin/v-generate-password-hash (hestiacp#3874)
* nitpicking v-generate-password-hash
hestiacp#1: some errors were sent in stdout, this is a problem because in other parts of HestiaCP, for example in v-check-user-password, we just check if it printed anything at all in stdout, like
hash=$($BIN/v-generate-password-hash "$method" "$salt" <<< "$password")
if [[ -z "$hash" ]]; then
echo "Error: password missmatch"
here $hash is not supposed to be "Error: not enough arguments"
also made sure we return exit code 1 (error) if the HASH_METHOD is invalid1 parent 61bca69 commit e77c9d9
1 file changed
+10
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 34 | + | |
40 | 35 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 36 | + | |
45 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
46 | 41 | | |
47 | 42 | | |
48 | 43 | | |
| |||
0 commit comments