A client that downgrades to a 1.6 or 1.7 server parsed key repeat with the 1.8 format and swallowed the messages behind it. ServerProxy is now the 1.6 form with 1.7 and 1.8 subclasses picked by the negotiated version, mirroring the ClientProxy classes.
37 lines
1,013 B
C++
37 lines
1,013 B
C++
/*
|
|
* Deskflow -- mouse and keyboard sharing utility
|
|
* SPDX-FileCopyrightText: (C) 2026 Synergy App Ltd
|
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
*/
|
|
|
|
#include "client/ServerProxy1_7.h"
|
|
|
|
#include "base/Log.h"
|
|
#include "deskflow/ProtocolTypes.h"
|
|
#include "deskflow/ProtocolUtil.h"
|
|
|
|
#include <cstring>
|
|
#include <string>
|
|
|
|
ServerProxy1_7::ServerProxy1_7(Client *client, deskflow::IStream *stream, IEventQueue *events)
|
|
: ServerProxy(client, stream, events)
|
|
{
|
|
}
|
|
|
|
ServerProxy::ConnectionResult ServerProxy1_7::parseMessage(const uint8_t *code)
|
|
{
|
|
auto result = ConnectionResult::Okay;
|
|
if (memcmp(code, kMsgDSecureInputNotification, 4) == 0) {
|
|
secureInputNotification();
|
|
} else {
|
|
result = ServerProxy::parseMessage(code);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
void ServerProxy1_7::secureInputNotification() const
|
|
{
|
|
std::string app;
|
|
ProtocolUtil::readf(getStream(), kMsgDSecureInputNotification + 4, &app);
|
|
LOG_INFO("application \"%s\" is blocking the keyboard", app.c_str());
|
|
}
|