bigbluebutton / greenlight

A really simple end-user interface for your BigBlueButton server.
GNU Lesser General Public License v3.0
794 stars 3.8k forks source link

V3: Room with only 1 character #4149

Closed debuglevel closed 1 year ago

debuglevel commented 1 year ago

Describe the bug I cannot create a room called 1, 0, "x" etc.

image

farhatahmad commented 1 year ago

This is expected, though we should be providing a better error message. I believe there is a validation on BBB's side that checks to make sure a room name is longer than 1 character

debuglevel commented 1 year ago

Any reason for this limitation? It's only a human readable display name after all.

farhatahmad commented 1 year ago

Not entirely sure - the API requires it to be at least 2 characters without much of an explanation. Changing the API is a whole other discussion :)

debuglevel commented 1 year ago

I'd like to reopen this issue, as rooms with only 1 character worked in Greenlight 2. Migration on such a room therefore creates an error:

Unable to migrate Room:
UID: sim-t0p-bad-xzu
Name: 1
Provider: greenlight}
Errors: ["Name translation missing: de.activerecord.errors.models.room.attributes.name.too_short"]

I think migrations should be as smooth as possible, especially because many admins still hesitate switching to Greenlight 3.

If nobody can think of an actual issue if minimum: 2 was changed to minimum: 1, it should be allowed IMHO. https://github.com/bigbluebutton/greenlight/blob/812dcfb6476f522ccac6a5447094378c709ad311/app/models/room.rb#LL37C8-L37C8

There MIGHT be an issue with these lines, as some databases might not allow searching LIKE with only 1 character. (I have no idea if Postgres allows it). https://github.com/bigbluebutton/greenlight/blob/812dcfb6476f522ccac6a5447094378c709ad311/app/models/room.rb#L48 https://github.com/bigbluebutton/greenlight/blob/812dcfb6476f522ccac6a5447094378c709ad311/app/models/room.rb#L54