grav-plugin-admin icon indicating copy to clipboard operation
grav-plugin-admin copied to clipboard

Odd behaviour when username includes directory separator symbol

Open jaderoca opened this issue 3 years ago • 1 comments

localhost is POP!OS, 21.10, derived from Ubuntu Grav v1.7.25 - Admin v1.10.25

Steps to reproduce: Create user where the user name includes the forward-slash character (/). For example, user/name

Result: Instead of getting a yaml file with the username as the filename, you get a directory named for the characters preceding the forward-slash that contains a yaml file with a name taken from the characters following the forward-slash. For example: user/ name.yaml

Other effects: That username does not show in the list of users on the accounts page, so cannot be modified or deleted at the admin interface. I had to go to the file system to delete the directory structure and file associated with the user.

Login in seems to work normally.

Tests not performed: I did not test the full range of non-alphanumeric characters. I did not test languages other than English. I did not do a deep dive on login tests to see if there are any unexpected login effects.

Other observations: I don't know if there is a reasonable use case, but if you wanted to hide usernames from the listing under Accounts for any reason, this would be one way to do it.

jaderoca avatar Dec 29 '21 19:12 jaderoca

Not sure why Grav allowed creating user like that as it should have blocked the illegal name...

mahagr avatar Jan 04 '22 12:01 mahagr