ICQ spam in Pidgin - disable authorization requests

    I don’t know how anyone, but I have already been lifted up by authorization requests via ICQ - 10-20 pieces a day come. Finally I found a way to completely disable this. On jabber accounts in the same instance of pidgin, authorization requests will come. When this kind of spam reaches the jabber, it will be necessary to come up with new protection measures.


    As you know, the libpurple library did not allow anti-spam plug-ins to set the reason for automatically rejecting the authorization request, which led to a pop-up window (i.e. without plug-ins it turned out even better, because authorization was shown in the contacts window and was less distracting). The author of pidgin-privacy-please (Stefan Ott) wrote a patch for pidgin that provides the necessary infrastructure and supported it in his plugin.

    Unfortunately, despite the fact that the patch is accepted in upstream, it is not in a hurry to release 2.8.0 and you 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 (aka in developer.pidgin.im/viewmtn/revision/info/490036a7b4ce807cb851ded91af7d959fe1c029e upstream ) and the latest snapshot of the source plugin code.google.com/p/pidgin-privacy-please .

    So, to get rid of any authorization requests, you must:
    • Install pidgin-2.7.10 (I think you can have an earlier version) by applying the above patch
    • Install pidgin-privacy-please from a trunk with an additional patch (see below)
    • In the plugin settings, put "Block authorization requests from OSCAR (ICQ / AIM)"
    • Make sure that the plugin also includes the options “Auto-reply on blocked messages with”, “Auto-reply on blocked messages from unknown people with”, “Block messages from people not on your contact list”

    This bundle also adds the ability to block requests containing url, but I did not turn on this functionality because of fears to prevent incoming requests from jabber. Since over the past year I 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 rejecting incoming authorization requests using this protocol is more or less acceptable.

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

    diff -Naur a/src/pidgin-pp.c b/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.c b/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
    

    Also popular now: