Bug discovered by one of my more punctuation-happy users, manifesting on: Webmin 1.851 Usermin 1.720 Virtualmin 5.99 Authentic Theme 18.49-8
To replicate this bug:
- Log into usermin
- Go into Manage Folders and choose to add a folder of type "Local mail file"
- Create a new folder, and set the folder name to a string WITH A TRAILING SPACE, eg "TestFolder " or "My Folder ".
- Still within Usermin, move or copy some messages into that newly created folder.
- Still within Usermin, open the newly created folder. It will appear as empty, despite the user having moved/copied messages into it.
Behind the scenes on the filesystem, the folder is successfully created as a directory WITH a trailing space in the filename. The directory DOES contain the mail messages that were moved/copied into the folder in usermin. They're just not being displayed successfully in Usermin. (Changing the folder name to remove the trailing space fixes the issue, and the messages in the folder then become visible as expected.)
I'm guessing this bug is down to a string operation stripping the trailing space; I haven't dug in to see if the issue is in Usermin itself or just in the Authentic theme.
Comments
Submitted by JamieCameron on Tue, 07/25/2017 - 00:12 Comment #1
Sounds like an escaping bug - for step 5, how did you select the new folder exactly?
Hi Jamie, in Usermin I opened the folder by simply clicking on its name in the "Mail" left hand menu tab, and also (as an extra test) by clicking on the "View" icon for that folder in the "Mail/Manage Folders" section.
It was the same result in either case; there was no apparent Usermin error in opening the folder, and it just showed as a "normal" but empty folder.
Submitted by JamieCameron on Sun, 07/30/2017 - 11:36 Comment #3
Ok, I was able to find the cause of this - surprisingly, perl treats files whose names end with a space in special way, which requires slightly different handling in the code. This will be fixed in the next Usermin release.
Brilliant, cheers Jamie!