--- loncom/lcuserdel 2000/10/29 22:38:21 1.9 +++ loncom/lcuserdel 2000/10/30 02:31:45 1.10 @@ -25,6 +25,11 @@ use strict; # Standard input usage # First line is USERNAME +# Valid user names must consist of ascii +# characters that are alphabetical characters +# (A-Z,a-z), numeric (0-9), or the underscore +# mark (_). (Essentially, the perl regex \w). + # Command-line arguments [USERNAME] # Yes, but be very careful here (don't pass shell commands) # and this is only supported to allow perl-system calls. @@ -96,6 +101,11 @@ else { my ($username)=@input; $username=~/^(\w+)$/; my $safeusername=$1; +if ($username ne $safeusername) { + print "Error. The user name specified has invalid characters.\n"; + unlink('/tmp/lock_lcpasswd'); + exit 9; +} &enable_root_capability;