View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005757||unreal||ircd||public||2020-09-26 03:04||2020-09-26 08:47|
|Fixed in Version||5.0.7-rc1|
|Summary||0005757: WHO hides yourself in result if not in any channels|
|Description||when utilizing /who <accountname> a it only lists the user whose nickname is the <accountname> even if multiple entities are logged into <accountname> and share a channel. |
This may possibly effect other WHO(X) aspects utilizing the accountname (this would require further testing).
|Steps To Reproduce||1. have a user log into an accountname and join a channel|
2. have a second user log into the same accountname as in step 1 and have them join the same channel as in step 1
3. have any client run /who accountname a <--- on the accountname that the users in step 1 and 2 have
Expected behavior: WHO(X) information about BOTH users is given back, since both are logged into the same accountname
Actual behavior: WHO(X) information is only given for the user whose nickname matches the accountname, rather than ALL users logged into said accountname.
tested on irc.unrealircd.org (UnrealIRCd-5.0.6)
this is most likely the cause, but it is not 100% certain that the explanation given is the true reason, albeit it seems likely
|Tags||No tags attached.|
|3rd party modules|
I see. Reading the source (i didn't write the whox code), it requires an explicit flag to search for account. So it should show up with "WHO accountname a".
Next question would then be "shouldn't it be included in the default?". And I'm leaning quite heavily towards "no". I think for a simple WHO query (one without search parameters I mean) it should only search NUH (nick user host) like classic WHO does. Otherwise, where does it stop? Who knows.. next option would be to search by certfp or whatever user property. Furthermore, it would be confusing to include things in results that have no visual connection, like account without %a in this case. I can already see the next bug report about that :)
Does that settle it for you?
I see an issue related to visibility and self that is confusing:
* As an IRCOp everything works fine, so then I started trying as non-IRCOp...
* If another user does "WHO accountname a" it may hide that user if that user is not in any common channels and is +i (invisible), that is OK and expected
* If another user does "WHO accountname a" and the other user with this accountname is in common channels or is -i (not invisible) then it correctly shows up, again all OK and expected
* Confusingly, it also does this hiding for yourself. So if you do "WHO accountname a" and you are +i and not in any channel, then it would not show your own entry in the WHO result.
The last thing is a bug.
I've updated the title to "WHO hides yourself in result if not in any channels" since I presume that was the issue (described above) that you were experiencing. What made it confusing was the non-ircop and the fact that for nick-queries it did not hide.
Thanks for the bug report, Koragg, fixed now! https://github.com/unrealircd/unrealircd/commit/a02f94f867daf86de75f033cb48e18831003372a
commit a02f94f867daf86de75f033cb48e18831003372a (HEAD -> unreal50, origin/unreal50)
Author: Bram Matthys <firstname.lastname@example.org>
Date: Sat Sep 26 08:31:20 2020 +0200
Clean up WHOX a bit and fix WHO hiding yourself if not in any channels,
reported by Koragg in https://bugs.unrealircd.org/view.php?id=5757.
This changes the following in the code of who_global():
1) We initialize all the 'marked' users to zero at the beginning,
and remove the previously unmarking in the bottom loop that
shouldn't have anything to do with it. Now there's "no way"
to screw up initialization of marked users.
2) Check for marked users in the bottom loop.
3) Thanks to #1 and #2 we can now easily add simple logic like
not skipping when client==acptr.
4) Similarly, we can remove checks for +i/-i in who_common_channel(),
and as a bonus we will list common channel results altogether
in the WHO result, rather than first +i on common and then at the
very end the remaining -i (which may also be in common channels).
All in all, the code is now more like how I would write it, rather
than the original. It's now harder to screw things up if you change
some visibility or searching logic here or there.
|2020-09-26 03:04||Koragg||New Issue|
|2020-09-26 07:44||syzop||Note Added: 0021747|
|2020-09-26 08:03||syzop||Note Added: 0021748|
|2020-09-26 08:03||syzop||Status||new => confirmed|
|2020-09-26 08:03||syzop||Summary||WHO a only recognizes if nickname == accountname => WHO hides yourself in result if not in any channels|
|2020-09-26 08:03||syzop||Note Added: 0021749|
|2020-09-26 08:05||syzop||Note Edited: 0021749||View Revisions|
|2020-09-26 08:47||syzop||Assigned To||=> syzop|
|2020-09-26 08:47||syzop||Status||confirmed => resolved|
|2020-09-26 08:47||syzop||Resolution||open => fixed|
|2020-09-26 08:47||syzop||Fixed in Version||=> 5.0.7-rc1|
|2020-09-26 08:47||syzop||Note Added: 0021751|