getgrav / getgrav/grav-plugin-admin

Odd behaviour when username includes directory separator symbol

Open
#2,215 1 comment 0 reactions 1 assignee Claimed by @mahagr View on GitHub
bug
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.