summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/CMPluginBase.cpp3
-rw-r--r--src/mir_app/src/newplugins.cpp2
-rw-r--r--src/mir_app/src/plugins.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp
index 2875c00fe1..b9ed701554 100644
--- a/src/mir_app/src/CMPluginBase.cpp
+++ b/src/mir_app/src/CMPluginBase.cpp
@@ -274,6 +274,9 @@ void CMPluginBase::debugLogW(LPCWSTR wszFormat, ...)
void CMPluginBase::RegisterProtocol(int type, pfnInitProto fnInit, pfnUninitProto fnUninit)
{
+ if (isPluginBanned(m_pInfo.uuid))
+ return;
+
if (type == PROTOTYPE_PROTOCOL && fnInit != nullptr)
type = PROTOTYPE_PROTOWITHACCS;
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp
index 57e55df16d..234ec3e4f2 100644
--- a/src/mir_app/src/newplugins.cpp
+++ b/src/mir_app/src/newplugins.cpp
@@ -114,7 +114,7 @@ static const MUUID pluginBannedList[] =
{ 0xe7c48bab, 0x8ace, 0x4cb3, { 0x84, 0x46, 0xd4, 0xb7, 0x34, 0x81, 0xf4, 0x97 } }, // mra
};
-static bool isPluginBanned(const MUUID &u1)
+bool isPluginBanned(const MUUID &u1)
{
for (auto &it : pluginBannedList)
if (it == u1)
diff --git a/src/mir_app/src/plugins.h b/src/mir_app/src/plugins.h
index ff0764fd2f..f46b3fa056 100644
--- a/src/mir_app/src/plugins.h
+++ b/src/mir_app/src/plugins.h
@@ -66,6 +66,7 @@ void SetPluginOnWhiteList(const wchar_t *pluginname, int allow);
int getDefaultPluginIdx(const MUUID &muuid);
bool hasMuuid(const MUUID *pFirst, const MUUID&);
+bool isPluginBanned(const MUUID &u1);
pluginEntry* OpenPlugin(wchar_t *tszFileName, wchar_t *dir, wchar_t *path);