Rooms showing hidden users online to guests

Chat rooms for mChat with optional password protection and 1-on-1 chats
Gary
Donor
Posts: 8
Joined: 24 Sep 2018, 22:28

Rooms showing hidden users online to guests

#1

Post by Gary » 20 Aug 2019, 15:47

Spotted a problem last night when I switched to the full shoutbox page and hover my mouse over the NAME of extra "public" Room added and clicked it I think. Even though I was logged in as invisible for that session (not user CP set as invisible). Using a second browser as a guest on my site, but logged in as invisible as admin in another browser. Hovering (or clickin) not sure which now - the room name in right side list showed admin as being in that room to the guest in another browser.

User avatar
kasimi
mChat developer
Posts: 996
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Rooms showing hidden users online to guests

#2

Post by kasimi » 25 Aug 2019, 10:22

This bug is fixed in Rooms 1.2.10. :+1:

Gary
Donor
Posts: 8
Joined: 24 Sep 2018, 22:28

Re: Rooms showing hidden users online to guests

#3

Post by Gary » 09 Sep 2019, 20:31

There seems to be a problem now when no users are in a Room and if you are a guest and click a room name to view who's in the room (when a room is empty). It throws up a JSON error to guest that views a room online users - when there is nobody in the room.

To see it happen. Make sure nobody is in a room, then click the room name as a guest logged out trying to view online room users. And you should see the JSON error message

User avatar
kasimi
mChat developer
Posts: 996
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Rooms showing hidden users online to guests

#4

Post by kasimi » 09 Sep 2019, 21:42

I can't reproduce this here or on my dev board. Any special permissions or setup you have that might cause this?

Gary
Donor
Posts: 8
Joined: 24 Sep 2018, 22:28

Re: Rooms showing hidden users online to guests

#5

Post by Gary » 09 Sep 2019, 22:34

Well I have all groups setup so only admin and mod can create private and passworded rooms. So all permission for other groups apart from admin and mod have permissions denied to create private or password rooms. Also have invite disabled for them as well apart from admin and mods because only they can actually create any extra rooms

It only seemed to show that JSON error when you viewed an empty room as a guest, then clicked the name of the room to view online users. If anyone is in the room then the JSON error doesn't get shown to the guest and displays the user in the room

Also, and this is not related to it. But I'll double check installing the rooms again to make sure it wasn't giving that error not realising that extra template conditional was added unknowingly when getting the error. But pretty sure it was still giving the error before me trying this (as I removed rooms now since this JSON error). I notice trying something with the template that shows online users, that if you wrap the online users code with a conditional to not show the online user list to guests, not even the Hidden Users online notice if a member is in the room as invisible. That no default phhBB conditions seems to work like using this for example

{% if USER_LOGGED_IN %}

So I'm curious. is there any phpbb conditionals at all that can be used in the room templates to hide things from guests?

Gary
Donor
Posts: 8
Joined: 24 Sep 2018, 22:28

Re: Rooms showing hidden users online to guests

#6

Post by Gary » 10 Sep 2019, 09:04

This is the error I'm seeing displayed after installing the rooms again

Code: Select all

- This code is only accessible to donors -

User avatar
kasimi
mChat developer
Posts: 996
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Rooms showing hidden users online to guests

#7

Post by kasimi » 10 Sep 2019, 09:17

Are you using Rooms 1.2.10? Do you have the same problem here on this board?
Gary wrote:
09 Sep 2019, 22:34
to not show the online user list to guests
I feel like there should be a new permission for that, wouldn't you agree?
Gary wrote:
09 Sep 2019, 22:34
is there any phpbb conditionals at all that can be used in the room templates to hide things from guests?
Try S_USER_LOGGED_IN

Gary
Donor
Posts: 8
Joined: 24 Sep 2018, 22:28

Re: Rooms showing hidden users online to guests

#8

Post by Gary » 10 Sep 2019, 09:37

No, it doesn't do it when I viewed the confessions room here as a guest with nobody in it.

Have you got any idea which file that JSON error might be coming from? I can try replacing it with a fresh upload of that file and see if that fixes it.

I'm using latest version. It says I'm using version 2.1.10

User avatar
kasimi
mChat developer
Posts: 996
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Rooms showing hidden users online to guests

#9

Post by kasimi » 10 Sep 2019, 09:45

You're using what now? It should say Rooms 1.2.10 in your ACP. :shock:

Did you edit any files? Yes, try a fresh copy of the extension.

Enable debug mode in your config.php to see a more detailed error message in your browser console.

Gary
Donor
Posts: 8
Joined: 24 Sep 2018, 22:28

Re: Rooms showing hidden users online to guests

#10

Post by Gary » 10 Sep 2019, 09:48

Sorry, yes, I meant 1.2.10

I'll do a fresh install of it again and see if the same thing happens. Let you know later, maybe I've edited something and broke it when messing around testing phpbb conditionals

Added in 30 minutes 28 seconds:
Installing a fresh copy fixed it. Must have done something and not known what

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest