PR: 245342
When entering a password sh's IFS default value (space tab, newline) so
any leading a trailing IFS characters are removed.
Setting IFS= (null) for just the two adduser.sh read lines will not
remove leading or trailing IFS characters.
Differential D24292
Don't remove leading or trailing IFS for passwords dereks_lifeofadishwasher.com on Apr 4 2020, 5:02 AM. Authored by Tags None Referenced Files
Subscribers
Details
PR: 245342 When entering a password sh's IFS default value (space tab, newline) so Setting IFS= (null) for just the two adduser.sh read lines will not (cmd)$ IFS= read -r p # with leading and trailing tabs foo (cmd)$ echo "|${p}|" | foo | (cmd)$ read -r p foo (cmd)$ echo "|${p}|" |foo| (ins)$ IFS= read -r p # with leading and trailing space foo (cmd)$ echo "|${p}|" | foo | (cmd)$ read -r p foo (cmd)$ echo "|${p}|" |foo| Test adduser.sh with IFS= lines and su -l newuser with the space/tab.
Diff Detail
Event TimelineComment Actions Some people wrongly add whitespace via copy and paste, but let's be consistent with login, passwd, etc. |