Hi all
I was testing the function fnCheckPass in webutils.c when I found a problem with the lines:
if ((ucCnt < 8 ) && (*ucNewInput != '&')) { // if we quit because the end of the reference has been found, we check that also the new input has exactly the same length
return 1; // bad password!!
}
return 0;
because if the new password (ucNewInput) matches only the first character and has added the '&' character as part of the word typed by the user, the algorithm returns 0, ignoring the length of the reference password (cReference).
The solution to the problem would be:
if ((ucCnt < 8) && (*cReference != '&')) // if we quit because the end of the reference has been found,
{ // we check that also the new input has exactly the same length
return 1; // bad password!!
}
return 0;
Regards
Cristian