svn commit: r360390 - in stable: 11/usr.sbin/adduser 12/usr.sbin/adduser

Kyle Evans kevans at FreeBSD.org
Mon Apr 27 19:29:49 UTC 2020


Author: kevans
Date: Mon Apr 27 19:29:48 2020
New Revision: 360390
URL: https://svnweb.freebsd.org/changeset/base/360390

Log:
  MFC r359642: adduser: allow standard IFS characters in passwords
  
  Notably, the default IFS contains space/tab, thus any leading/trailing
  whitespace characters tend to be removed.
  
  Set IFS= for just the read lines to mitigate this, allowing the user to be
  less surprised when their leading/trailing spaces weren't actually captured
  in the password as they are with other means of setting a user's password.
  
  PR:		245342

Modified:
  stable/12/usr.sbin/adduser/adduser.sh
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/adduser/adduser.sh
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/usr.sbin/adduser/adduser.sh
==============================================================================
--- stable/12/usr.sbin/adduser/adduser.sh	Mon Apr 27 18:07:38 2020	(r360389)
+++ stable/12/usr.sbin/adduser/adduser.sh	Mon Apr 27 19:29:48 2020	(r360390)
@@ -733,10 +733,10 @@ input_interactive() {
 					trap 'stty echo; exit' 0 1 2 3 15
 					stty -echo
 					echo -n "Enter password: "
-					read -r upass
+					IFS= read -r upass
 					echo''
 					echo -n "Enter password again: "
-					read -r _passconfirm
+					IFS= read -r _passconfirm
 					echo ''
 					stty echo
 					# if user entered a blank password


More information about the svn-src-stable-12 mailing list