Chatroom nicknames under 6 char are rejected

Bug #1465298 reported by Neurovertex on 2015-06-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Movim
Fix Committed
Low
edhelas

Bug Description

In app/widgets/Rooms/Rooms.php::checkConnected (line 211), the $resource variable is validated before joining a room. A valid resource/nick, according to the code (validateResource, l.262) is a string whose length is between 6 and 40.

I think that's an arbitrary and unecessary restriction. I understand the decision to "sanitize" nicknames a minimum but 6 chars is way too strict. "More than 1 character" would be an understandable requirement, but even actual first names with 3 letters aren't that rare, 4 are even pretty common. 2 or 3 chars min would make more sense in my opinion.

Another point is that, when validation fails, the only thing the user sees is a notification about the the chatroom ID being invalid (chatrooms.bad_id => "Bad Chatroom ID"). Error should state at least that the nick isn't valid, and ideally precise the actual restriction.

Neurovertex (nv-s) wrote :

reading locales.ini, I found "chatrooms.bad_nickname = 'Please enter a correct nickname (6 to 40 characters)'". It appears so that the error is just a wrong string ID displayed in Rooms.php.

Attached a patch to change minimum nick size to 2 and fix the String ID.

edhelas (edhelas) on 2015-06-15
Changed in movim:
status: New → Confirmed
status: Confirmed → Fix Committed
importance: Undecided → Low
assignee: nobody → edhelas (edhelas)
milestone: none → 0.9
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers