PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » File_Passwd » Bug #3348

# sign in any field breaks passwd file

Details

Submitted2005-02-01 17:07 UTC
Fromwhitehatcheck at yahoo dot com
Assignedmike
StatusClosed
PackageFile_Passwd
PHP Version4.3.10
OSSolaris 9
Roadmaps(Not assigned)

Comments

[2005-02-01 17:07 UTC] whitehatcheck at yahoo dot com

Description:
------------
Current Version: File_Passwd-1.1.0

If passwd file contains a existing '#' in the geckos string it will break the passwd file from that point out by ommiting the rest of that line.

Example Passwd entry before PEAR interaction:
user1:x:123123:123:User_Guy_#1_1231234:/home/user1:/bin/false

Example Passwd entry after PEAR interaction:
user1:x:123123:123:User_Guy_

This would make any lines after this unusable to the system.

Reproduce code:
---------------
Manually usermod the passwd file and add a '#' to the comments.

Then execute PEAR script to modify another user. At this point, cat'ing the passwd file.. it will be hosed.

Expected result:
----------------
Expected the '#' sign to remain within the passwd file.

Actual result:
--------------
'#' sign is removed.. and all characters after it till the newline.