fix: remove ClipboardSending handler in proxy destructors (UAF)
fixes: #9842
This commit is contained in:
parent
750fdbeb34
commit
13f98475a2
3 changed files with 7 additions and 1 deletions
|
|
@ -55,6 +55,7 @@ ServerProxy::~ServerProxy()
|
||||||
{
|
{
|
||||||
setKeepAliveRate(-1.0);
|
setKeepAliveRate(-1.0);
|
||||||
m_events->removeHandler(EventTypes::StreamInputReady, m_stream->getEventTarget());
|
m_events->removeHandler(EventTypes::StreamInputReady, m_stream->getEventTarget());
|
||||||
|
m_events->removeHandler(EventTypes::ClipboardSending, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerProxy::resetKeepAliveAlarm()
|
void ServerProxy::resetKeepAliveAlarm()
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,11 @@ ClientProxy1_6::ClientProxy1_6(const std::string &name, deskflow::IStream *strea
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClientProxy1_6::~ClientProxy1_6()
|
||||||
|
{
|
||||||
|
m_events->removeHandler(EventTypes::ClipboardSending, this);
|
||||||
|
}
|
||||||
|
|
||||||
void ClientProxy1_6::setClipboard(ClipboardID id, const IClipboard *clipboard)
|
void ClientProxy1_6::setClipboard(ClipboardID id, const IClipboard *clipboard)
|
||||||
{
|
{
|
||||||
// ignore if this clipboard is already clean
|
// ignore if this clipboard is already clean
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class ClientProxy1_6 : public ClientProxy1_5
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ClientProxy1_6(const std::string &name, deskflow::IStream *adoptedStream, Server *server, IEventQueue *events);
|
ClientProxy1_6(const std::string &name, deskflow::IStream *adoptedStream, Server *server, IEventQueue *events);
|
||||||
~ClientProxy1_6() override = default;
|
~ClientProxy1_6() override;
|
||||||
|
|
||||||
void setClipboard(ClipboardID id, const IClipboard *clipboard) override;
|
void setClipboard(ClipboardID id, const IClipboard *clipboard) override;
|
||||||
bool recvClipboard() override;
|
bool recvClipboard() override;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue