diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-23 15:47:05 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-23 15:47:05 +0100 |
commit | 61f0f83fb277213e4038b602183f24a827e93b31 (patch) | |
tree | 520b21b26ae31eba424717f26d68ae5db48c8920 /FICS/command.c | |
parent | d0a0d7f87a9204eb5e1e015ae2cf4de3595a6543 (diff) |
Fixed salt
Diffstat (limited to 'FICS/command.c')
-rw-r--r-- | FICS/command.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/FICS/command.c b/FICS/command.c index 5ee2f46..84f79c2 100644 --- a/FICS/command.c +++ b/FICS/command.c @@ -660,7 +660,7 @@ check_news(int p, int admin) PRIVATE int process_password(int p, char *password) { - char salt[3]; + char salt[6]; int dummy; // to hold a return value int fd; int messnum; @@ -670,9 +670,12 @@ process_password(int p, char *password) turn_echo_on(parray[p].socket); if (parray[p].passwd && parray[p].registered) { - salt[0] = parray[p].passwd[0]; - salt[1] = parray[p].passwd[1]; - salt[2] = '\0'; + salt[0] = '$'; + salt[1] = '1'; + salt[2] = '$'; + salt[3] = parray[p].passwd[0]; + salt[4] = parray[p].passwd[1]; + salt[5] = '\0'; if (strcmp(crypt(password, salt), parray[p].passwd)) { fd = parray[p].socket; |