Fixed bug when properties were not updated when
passwd file was removed.
This commit is contained in:
parent
bfc17b11a1
commit
2ba56a02cb
1 changed files with 3 additions and 1 deletions
|
@ -25,8 +25,10 @@ public class CryptFile {
|
||||||
|
|
||||||
|
|
||||||
public boolean authenticate (String username, String pw) {
|
public boolean authenticate (String username, String pw) {
|
||||||
if (file.exists() && file.lastModified () > lastRead)
|
if (file.exists () && file.lastModified () > lastRead)
|
||||||
readFile ();
|
readFile ();
|
||||||
|
else if (!file.exists () && users.size () > 0)
|
||||||
|
users.clear ();
|
||||||
String realpw = users.getProperty (username);
|
String realpw = users.getProperty (username);
|
||||||
if (realpw != null) {
|
if (realpw != null) {
|
||||||
// check if password matches
|
// check if password matches
|
||||||
|
|
Loading…
Add table
Reference in a new issue