diff options
Diffstat (limited to 'src/Client/Authenticators/PasswordAuthenticator.cpp')
-rw-r--r-- | src/Client/Authenticators/PasswordAuthenticator.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Client/Authenticators/PasswordAuthenticator.cpp b/src/Client/Authenticators/PasswordAuthenticator.cpp index 6690b22..77abb24 100644 --- a/src/Client/Authenticators/PasswordAuthenticator.cpp +++ b/src/Client/Authenticators/PasswordAuthenticator.cpp @@ -36,7 +36,7 @@ void PasswordAuthenticator::PasswordAuthRequest::sendRequest() { packet.set("user", username); if(hash == "Clear") - packet.set("data", password); + packet.set("data", std::vector<boost::uint8_t>(password.begin(), password.end())); else packet.set("data", Common::Hash::hash(std::vector<boost::uint8_t>(password.begin(), password.end()), hash)); @@ -49,7 +49,7 @@ void PasswordAuthenticator::PasswordAuthRequest::handlePacket(boost::shared_ptr< packet->get<long>("SubCode"), packet->get<long>("SubSubCode"))); return; } - else if(packet->getType() != "OK" && packet->getType() != "Continue") { + else if(packet->getType() != "OK") { signalFinished(Core::Exception(Core::Exception::UNEXPECTED_PACKET)); return; // TODO Logging } @@ -104,9 +104,6 @@ void PasswordAuthenticator::authenticate(Common::Application *application, Commo if(!result.first || result.second) throw result.second; - - if(result.first->getType() != "OK") - throw Core::Exception(Core::Exception::NOT_AVAILABLE); } } |