Fixed pass-the-hash vulnerability

This commit is contained in:
Phantom Voltage 2017-05-13 11:44:25 -07:00
parent f9bf041b50
commit 09a901b104
1 changed files with 6 additions and 0 deletions

View File

@ -2057,11 +2057,17 @@ passwordgood (char *cpw)
crypted = crypt (cpw, cpw); crypted = crypt (cpw, cpw);
if (crypted == NULL) if (crypted == NULL)
return 0; return 0;
#ifdef USE_SQLITE3
if (!strncmp (crypted, me->password, DGL_PASSWDLEN)) if (!strncmp (crypted, me->password, DGL_PASSWDLEN))
return 1; return 1;
#else
if (!strncmp (cpw, me->password, DGL_PASSWDLEN)) if (!strncmp (cpw, me->password, DGL_PASSWDLEN))
return 1; return 1;
#endif
return 0; return 0;
} }