Skip to content

Fix handling of commas in GECOS field

Michael Catanzaro requested to merge mcatanzaro/#83 into master

Because real name is stored in the GECOS field of /etc/passwd, which is delimited by commas that cannot be escaped, the user's real name must not contain a comma. Reject requests to change the real name to something containing a comma. Also, preserve the first comma and everything after it when changing the real name, rather than overwriting it.

Credit to maltek for discovery.

Merge request reports