- Timestamp:
- 06/13/05 16:33:16 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/admin.cgi
r258 r259 281 281 "<hr>Add new user:<form action=admin.cgi method=POST>\n". 282 282 "Username: <input name=username><br>\n". 283 "Password: <input name=password> <br>\n".283 "Password: <input name=password> <input type=checkbox name=preenc>Password is pre-encrypted (MUST be crypt() encrypted)<br>\n". 284 284 "<input type=submit value='Add user'><input type=hidden name=action value=newuser></form>\n"; 285 285 … … 326 326 } elsif ($webvar{action} eq 'newuser') { 327 327 print "Adding user $webvar{username}...\n"; 328 my $cr_pass = crypt $webvar{password},329 join('',('.','/',0..9,'A'..'Z','a'..'z')[rand 64, rand 64]);328 my $cr_pass = ($webvar{preenc} ? $webvar{password} : 329 crypt $webvar{password}, join('',('.','/',0..9,'A'..'Z','a'..'z')[rand 64, rand 64])); 330 330 $sth = $ip_dbh->prepare("insert into users (username,password,acl) values ". 331 331 "('$webvar{username}','$cr_pass','b')");
Note:
See TracChangeset
for help on using the changeset viewer.