diff --git a/build b/build index 8bfa2f5..9f72858 100644 --- a/build +++ b/build @@ -1 +1 @@ -86 \ No newline at end of file +88 \ No newline at end of file diff --git a/src/RESTAPI/RESTAPI_oauth2Handler.cpp b/src/RESTAPI/RESTAPI_oauth2Handler.cpp index 29b118f..d59d2a7 100644 --- a/src/RESTAPI/RESTAPI_oauth2Handler.cpp +++ b/src/RESTAPI/RESTAPI_oauth2Handler.cpp @@ -17,6 +17,13 @@ #include "StorageService.h" namespace OpenWifi { + + static void FilterCredentials(SecurityObjects::UserInfo & U) { + U.currentPassword.clear(); + U.lastPasswords.clear(); + U.oauthType.clear(); + } + void RESTAPI_oauth2Handler::DoGet() { bool Expired = false; if (!IsAuthorized(Expired)) { @@ -28,7 +35,9 @@ namespace OpenWifi { if(GetMe) { Logger_.information(Poco::format("REQUEST-ME(%s): Request for %s", Request->clientAddress().toString(), UserInfo_.userinfo.email)); Poco::JSON::Object Me; - UserInfo_.userinfo.to_json(Me); + SecurityObjects::UserInfo ReturnedUser = UserInfo_.userinfo; + FilterCredentials(ReturnedUser); + ReturnedUser.to_json(Me); return ReturnObject(Me); } BadRequest(RESTAPI::Errors::UnrecognizedRequest);