Opened 17 years ago

Last modified 17 years ago

#594 new Defect

Commas in usernames break private messages

Reported by: ToeBee Owned by: unassigned
Priority: Minor Milestone: Undetermined
Component: Web - Private Messages Version:
Keywords: private message delimiter comma Cc:

Description

Commas are used on the "Send Private Message" page (pm.php?action=new) to allow you to send messages to multiple recipients. However this causes a problem if the user you are trying to send a message to has a comma in their username. It tries to find two users to send the message to. As a workaround you can remove the name and only use the user ID but when you click on a user's name from the forum both are included.

Either a different delimiter needs to be used or the username needs to be enclosed in something or maybe commas in usernames should be escaped. Currently the username is enclosed in parens but the parsing of usernames apparently doesn't take them into account. Also, what if a username has parens in their name? Should some of these characters be disallowed?

Change History (1)

comment:1 Changed 17 years ago by davea

Owner: changed from davea to unassigned

The easiest thing to do is require that commas in user names be escaped with \ (and to do this when prepopulating the field). This will require using preg_split() instead of explode() in pm.php line 169. I don't have time to do this right now; patches welcome.

Note: See TracTickets for help on using tickets.