Implementing several adjustments for security reasons.

This commit is contained in:
stephb9959
2021-11-09 11:33:20 -08:00
parent 7b19143d6f
commit 45a50483be
34 changed files with 862 additions and 272 deletions

View File

@@ -25,7 +25,11 @@ namespace OpenWifi {
} else if(!StorageService()->GetUserById(Id,UInfo)) {
return NotFound();
}
Poco::JSON::Object UserInfoObject;
UInfo.currentPassword.clear();
UInfo.lastPasswords.clear();
UInfo.oauthType.clear();
UInfo.to_json(UserInfoObject);
ReturnObject(UserInfoObject);
}
@@ -45,8 +49,9 @@ namespace OpenWifi {
return NotFound();
}
if(AuthService()->DeleteUserFromCache(UInfo.email))
;
if(AuthService()->DeleteUserFromCache(UInfo.email)) {
// nothing to do
}
Logger_.information(Poco::format("Remove all tokens for '%s'", UserInfo_.userinfo.email));
StorageService()->RevokeAllTokens(UInfo.email);
Logger_.information(Poco::format("User '%s' deleted by '%s'.",Id,UserInfo_.userinfo.email));