mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Only use letters in randomly generated recovery password
SVN revision: 1392
This commit is contained in:
parent
e309e0e7a2
commit
dcb71de402
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.676 2005/06/04 10:55:08 ritt
|
||||||
|
Only use letters in randomly generated recovery password
|
||||||
|
|
||||||
Revision 1.675 2005/06/04 08:52:15 ritt
|
Revision 1.675 2005/06/04 08:52:15 ritt
|
||||||
Fixed 'pippo-bug' of 'list display' option
|
Fixed 'pippo-bug' of 'list display' option
|
||||||
|
|
||||||
@ -11635,8 +11638,8 @@ void show_forgot_pwd_page(LOGBOOK * lbs)
|
|||||||
|
|
||||||
/* create random password */
|
/* create random password */
|
||||||
srand((unsigned int) time(NULL));
|
srand((unsigned int) time(NULL));
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 8; i++)
|
||||||
str[i] = rand() & 0x7F;
|
str[i] = 'A' + (rand() % 25);
|
||||||
str[i] = 0;
|
str[i] = 0;
|
||||||
base64_encode(str, pwd);
|
base64_encode(str, pwd);
|
||||||
do_crypt(pwd, pwd_encrypted);
|
do_crypt(pwd, pwd_encrypted);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user