[IRCServices] Bug in NickServ listlinks

Craig McLure Craig at frostycoolslug.com
Mon Mar 28 10:09:30 PST 2005


My mistake, the code went in the wrong place..

Find the Section:

-- Code Snippit (Line 208) --
         if (!(ni = u->ni) || !(ngi = u->ngi) || ngi == 
NICKGROUPINFO_INVALID) {
             notice_lang(s_NickServ, u, NICK_NOT_REGISTERED);
             return;
         }
-- Code Snippit --

And replace it with:

-- Code Snippit --
         if (!(ni = u->ni) || !(ngi = u->ngi) || ngi == 
NICKGROUPINFO_INVALID) {
             notice_lang(s_NickServ, u, NICK_NOT_REGISTERED);
             return;
         } else if (!user_identified(u)) {
             notice_lang(s_NickServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ);
             return;
         }

-- End Code Snippit --

and remove the text on line 197

My appoligies for the mixup.

--
With this new fix in place, if a user attempts to /ns listlinks they get:

(19:04:37)  ›› [ NickServ (services at chatspike.net) ] Password 
authentication required for that command.
(19:04:37)  ›› [ NickServ (services at chatspike.net) ] Retry after typing 
/msg NickServ IDENTIFY password.

(I have an annoying habit of not testing code before submitting it :/)

Sorry again.


/****************************************
  *     Craig "FrostyCoolSlug" McLure
  *       Craig at FrostyCoolSlug.com
  * InspIRCd   - http://www.inspircd.org
  * ChatSpike  - http://www.chatspike.net
  ****************************************/

Craig McLure wrote:
> Well spotted, If your looking for an immediate fix, find 
> ircservices-5.0.xx/modules/nickserv/link.c
> 
> and add the following at line 197
> 
> --- CODE SNIPPIT ---
>     } else if (!user_identified(u)) {
>         notice_lang(s_NickServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ);
>         return;
> 
> --- END CODE SNIPPIT ---
> 
> (You should be able to paste all that, including the line break into 
> like 197, and everything will fall into alignment)
> 
> I'm sure andy will include this fix in the next release of services :)
> /****************************************
>  *     Craig "FrostyCoolSlug" McLure
>  *       Craig at FrostyCoolSlug.com
>  * InspIRCd   - http://www.inspircd.org
>  * ChatSpike  - http://www.chatspike.net
>  ****************************************/
> 
> Katarn wrote:
> 
>> Hi,
>>
>> It was brought to my attention by a user the other day, that NickServ's
>> listlinks feature works for any nickname, without identifying for the
>> nick. By default, only services operators or above are supposed to be 
>> able
>> to do this I believe.
>> Basically, any person can come on with any nick that they want to see all
>> the linked nicks for, and use "/msg nickserv listlinks" to see all the
>> nicknames linked to that nick, if they have not identified at all.
>> -Katarn
>>
>>
>> ------------------------------------------------------------------
>> To unsubscribe or change your subscription options, visit:
>> http://lists.ircservices.za.net/mailman/listinfo/ircservices
>>
>>
> 
> ------------------------------------------------------------------
> To unsubscribe or change your subscription options, visit:
> http://lists.ircservices.za.net/mailman/listinfo/ircservices
> 
>