diff --git a/libresapi/src/api/IdentityHandler.cpp b/libresapi/src/api/IdentityHandler.cpp index 6b7e1d05d..89d58378d 100644 --- a/libresapi/src/api/IdentityHandler.cpp +++ b/libresapi/src/api/IdentityHandler.cpp @@ -164,9 +164,6 @@ IdentityHandler::IdentityHandler(StateTokenServer *sts, RsNotify *notify, addResourceHandler("notown_ids", this, &IdentityHandler::handleNotOwnIdsRequest); - addResourceHandler("create_identity", this, - &IdentityHandler::handleCreateIdentity); - addResourceHandler("export_key", this, &IdentityHandler::handleExportKey); addResourceHandler("import_key", this, &IdentityHandler::handleImportKey); diff --git a/libresapi/src/api/RsControlModule.cpp b/libresapi/src/api/RsControlModule.cpp index 8b366686e..eb076086f 100644 --- a/libresapi/src/api/RsControlModule.cpp +++ b/libresapi/src/api/RsControlModule.cpp @@ -26,6 +26,7 @@ RsControlModule::RsControlModule(int argc, char **argv, StateTokenServer* sts, A mAutoLoginNextTime(false), mWantPassword(false), mPrevIsBad(false), + mCountAttempts(0), mPassword("") { mStateToken = sts->getNewToken(); @@ -64,7 +65,14 @@ bool RsControlModule::askForPassword(const std::string &title, const std::string { RS_STACK_MUTEX(mDataMtx); // ********** LOCKED ********** - mPrevIsBad = prev_is_bad; + mCountAttempts++; + if(mCountAttempts == 3) + { + mPrevIsBad = prev_is_bad; + mCountAttempts = 0; + } + else + mPrevIsBad = false; if(mFixedPassword != "") { diff --git a/libresapi/src/api/RsControlModule.h b/libresapi/src/api/RsControlModule.h index c6a86d247..38d564d9a 100644 --- a/libresapi/src/api/RsControlModule.h +++ b/libresapi/src/api/RsControlModule.h @@ -78,7 +78,8 @@ private: // to notify that a password callback is waiting // to answer the request, clear the flag and set the password bool mWantPassword; - bool mPrevIsBad ; + bool mPrevIsBad; + int mCountAttempts; std::string mTitle; std::string mKeyName; std::string mPassword;