View Issue Details

IDProjectCategoryView StatusLast Update
0005761unrealircdpublic2020-10-11 08:42
ReporterKoragg Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.0.7-rc1 
Fixed in Version5.0.8-rc1 
Summary0005761: WHO accountname a only shows all logged in entities if neither uses the nick accountname
DescriptionThis is a continuation of the unforutnately not resolved issue 0005757 with some additional information on when it does work.

The accountname in services is Koragg, and two test entities are logged in as Koragg and share at least one common channel.

1. connection 1 and connection 2 are not called Koragg (e.g. AwayLurker and Testah)

WHO Koragg a <--- returns both AwayLurker and Testah correctly

2. connection 1 OR connection 2 is called Koragg (e.g. AwayLurker and Koragg OR Koragg and Testah

WHOX Koragg a <--- returns only the connection whose nickname is Koragg

tl;dr WHOS accountname a only works if no connection also has the nickname accountname, otherwise it only retrives WHOX data for the nickname accountname, even if the entities all share a common channel.

Hopefully this additional insight can be of some use in fixing this bug.

Regards,

Koragg
TagsNo tags attached.
3rd party modules

Activities

syzop

2020-09-30 17:50

administrator   ~0021787

I will take a look at reproducing / fixing this in the weekend, when I have time again. Thanks for the report :)

syzop

2020-10-09 17:06

administrator   ~0021792

I think this is caused by simply this code:

        /* '/who nick' */
        if (((acptr = find_person(mask, NULL)) != NULL) &&
                (!(fmt.matchsel & WMATCH_MODES)) &&
                (!(fmt.matchsel & WMATCH_OPER) || IsOper(acptr)))
        {
[..]

So basically, if your WHO request matches a nick name then it will run this special code.

Perhaps that might be useful for "WHO nick" but in case of "WHO something a" that shouldn't happen.

I don't think I will touch it before 5.0.7 release though, let's fix it after the release.

syzop

2020-10-11 08:42

administrator   ~0021804

Fixed now, thanks for the report Koragg, our WHO(X) bug hunter :D

As you can see I did not go the lazy way by adding another !(fmt.matchsel & ... stuff. No, instead i removed all that code and fixed the underlying problem. Hopefully without breaking something but I think the logic is sane :D

https://github.com/unrealircd/unrealircd/commit/00fa88daee6eaedc827126f26dc86d8471579033

commit 00fa88daee6eaedc827126f26dc86d8471579033 (HEAD -> unreal50, origin/unreal50)
Author: Bram Matthys <[email protected]>
Date: Sun Oct 11 08:37:22 2020 +0200

    Remove special code for '/who nick' and replace it with generic code
    if someone searches explicitly on a nick name and that user exists.
    
    This fixes a bug where doing '/who name a' would return only 1 result
    if 'name' exists as a nick, even though multiple people with the
    same account 'name' are online and visible to the user, as
    reported in https://bugs.unrealircd.org/view.php?id=5761 by Koragg.

Issue History

Date Modified Username Field Change
2020-09-28 23:57 Koragg New Issue
2020-09-30 17:50 syzop Note Added: 0021787
2020-10-09 17:06 syzop Note Added: 0021792
2020-10-11 08:42 syzop Assigned To => syzop
2020-10-11 08:42 syzop Status new => resolved
2020-10-11 08:42 syzop Resolution open => fixed
2020-10-11 08:42 syzop Fixed in Version => 5.0.8-rc1
2020-10-11 08:42 syzop Note Added: 0021804