parent
61bbdd6807
commit
ad58ece180
|
@ -1657,19 +1657,18 @@ void Server::handleCommand_SrpBytesM(NetworkPacket* pkt)
|
||||||
|
|
||||||
bool wantSudo = (cstate == CS_Active);
|
bool wantSudo = (cstate == CS_Active);
|
||||||
|
|
||||||
verbosestream << "Server: Received TOCLIENT_SRP_BYTES_M." << std::endl;
|
verbosestream << "Server: Received TOSERVER_SRP_BYTES_M." << std::endl;
|
||||||
|
|
||||||
if (!((cstate == CS_HelloSent) || (cstate == CS_Active))) {
|
if (!((cstate == CS_HelloSent) || (cstate == CS_Active))) {
|
||||||
actionstream << "Server: got SRP _M packet in wrong state "
|
warningstream << "Server: got SRP_M packet in wrong state "
|
||||||
<< cstate << " from " << addr_s
|
<< cstate << " from " << addr_s << ". Ignoring." << std::endl;
|
||||||
<< ". Ignoring." << std::endl;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->chosen_mech != AUTH_MECHANISM_SRP &&
|
if (client->chosen_mech != AUTH_MECHANISM_SRP &&
|
||||||
client->chosen_mech != AUTH_MECHANISM_LEGACY_PASSWORD) {
|
client->chosen_mech != AUTH_MECHANISM_LEGACY_PASSWORD) {
|
||||||
actionstream << "Server: got SRP _M packet, while auth"
|
warningstream << "Server: got SRP_M packet, while auth "
|
||||||
<< "is going on with mech " << client->chosen_mech << " from "
|
"is going on with mech " << client->chosen_mech << " from "
|
||||||
<< addr_s << " (wantSudo=" << wantSudo << "). Denying." << std::endl;
|
<< addr_s << " (wantSudo=" << wantSudo << "). Denying." << std::endl;
|
||||||
if (wantSudo) {
|
if (wantSudo) {
|
||||||
DenySudoAccess(peer_id);
|
DenySudoAccess(peer_id);
|
||||||
|
@ -1717,7 +1716,7 @@ void Server::handleCommand_SrpBytesM(NetworkPacket* pkt)
|
||||||
|
|
||||||
std::string checkpwd; // not used, but needed for passing something
|
std::string checkpwd; // not used, but needed for passing something
|
||||||
if (!m_script->getAuth(playername, &checkpwd, NULL)) {
|
if (!m_script->getAuth(playername, &checkpwd, NULL)) {
|
||||||
actionstream << "Server: " << playername <<
|
errorstream << "Server: " << playername <<
|
||||||
" cannot be authenticated (auth handler does not work?)" <<
|
" cannot be authenticated (auth handler does not work?)" <<
|
||||||
std::endl;
|
std::endl;
|
||||||
DenyAccess(peer_id, SERVER_ACCESSDENIED_SERVER_FAIL);
|
DenyAccess(peer_id, SERVER_ACCESSDENIED_SERVER_FAIL);
|
||||||
|
|
Loading…
Reference in New Issue