📜 ⬆️ ⬇️

ICQ spam in Pidgin - disable authorization requests

I do not know how anyone, but I already got requests for authorization via ICQ - 10-20 pieces a day come. Finally found a way to turn it all off completely. On jabber accounts in the same instance of pidgin authorization requests will come. When this kind of spam gets to jabber, it will be necessary to invent new measures of protection.


As is known, the libpurple library did not allow anti-spam plug-ins to specify the reason for the automatic rejection of an authorization request, which resulted in a pop-up window (i.e., without plug-ins, it turned out even better, since authorization was shown in the contact window and was less distracting). Author pidgin-privacy-please (Stefan Ott) wrote a patch for pidgin, providing the necessary infrastructure and supported it in its plugin.

Unfortunately, despite the fact that the patch is accepted in upstream, release 2.8.0 is not in a hurry and will have to do the necessary work yourself. To do this, we need pidgin 2.7.10 (current at the moment), a patch on it developer.pidgin.im/ticket/8690 (also in developer.pidgin.im/viewmtn/revision/info/490036a7b4ce807cb851ded91af7d959fe1c029e ) and the last source code plugin code.google.com/p/pidgin-privacy-please .
')
So, to get rid of any authorization requests, you need:

This bundle also adds the ability to block requests containing url, but I didn’t include this functionality because of concerns to prevent incoming requests in jabber. Since over the past year I have only added 3 or 4 ICQ contacts (and in all cases, the interlocutors had the opportunity to contact me by mail or phone), the option of completely refusing incoming authorization requests using this protocol is more or less acceptable.

Everything was checked under Linux, but I see no reason to prevent this from being repeated in Windows.

diff -Naur a/src/pidgin-pp.cb/src/pidgin-pp.c --- a/src/pidgin-pp.c 2011-02-20 12:34:06.234472155 +0600 +++ b/src/pidgin-pp.c 2011-02-20 12:35:44.954334909 +0600 @@ -200,7 +200,7 @@ } static int -#if PURPLE_VERSION_CHECK(2, 8, 0) +#if PURPLE_VERSION_CHECK(2, 7, 0) request_authorization_cb(PurpleAccount* account, char *sender, char *msg) #else request_authorization_cb(PurpleAccount* account, char *sender) @@ -238,7 +238,7 @@ return deny; } -#if PURPLE_VERSION_CHECK(2, 8, 0) +#if PURPLE_VERSION_CHECK(2, 7, 0) if (prefs_auth_block_with_url() && (msg != NULL)) { const gchar *pattern = "http:\\/\\/"; @@ -348,7 +348,7 @@ purple_signal_connect(conv_handle, "receiving-im-msg", plugin, PURPLE_CALLBACK(receiving_im_msg_cb), NULL); -#if PURPLE_VERSION_CHECK(2, 8, 0) +#if PURPLE_VERSION_CHECK(2, 7, 0) purple_signal_connect(acct_handle, "account-authorization-requested-with-message", plugin, PURPLE_CALLBACK(request_authorization_cb), diff -Naur a/src/pp-prefs.cb/src/pp-prefs.c --- a/src/pp-prefs.c 2011-02-20 12:34:06.234472155 +0600 +++ b/src/pp-prefs.c 2011-02-20 12:35:11.796420366 +0600 @@ -71,7 +71,7 @@ pref_boolean(auth_block_all, "block_auth_all"); pref_boolean(auth_block_oscar, "block_auth_oscar"); -#if PURPLE_VERSION_CHECK(2, 8, 0) +#if PURPLE_VERSION_CHECK(2, 7, 0) pref_boolean(auth_block_with_url, "block_auth_with_url"); #endif // PURPLE_VERSION_CHECK pref_boolean(auth_block_repeated, "block_denied"); @@ -183,7 +183,7 @@ pidgin_prefs_checkbox( _("Block authorization requests from OSCAR (ICQ/AIM)"), "/plugins/core/pidgin_pp/block_auth_oscar", tab_vbox); -#if PURPLE_VERSION_CHECK(2, 8, 0) +#if PURPLE_VERSION_CHECK(2, 7, 0) pidgin_prefs_checkbox( _("Block authorization requests with hyperlinks"), "/plugins/core/pidgin_pp/block_auth_with_url", tab_vbox); @@ -266,7 +266,7 @@ "/plugins/core/pidgin_pp/block_auth_all", FALSE); purple_prefs_add_bool( "/plugins/core/pidgin_pp/block_auth_oscar", FALSE); -#if PURPLE_VERSION_CHECK(2, 8, 0) +#if PURPLE_VERSION_CHECK(2, 7, 0) purple_prefs_add_bool( "/plugins/core/pidgin_pp/block_auth_with_url", FALSE); #endif // PURPLE_VERSION_CHECK 

Source: https://habr.com/ru/post/114122/


All Articles