Changeset 14370

Show
Ignore:
Timestamp:
14.08.2007 13:00:53 (12 years ago)
Author:
qq6
Message:

encrypt the password

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/WEB-INF/cgi/gliserver4gs3.pl

    r14326 r14370  
    2323    # Load the Greenstone modules that we need to use 
    2424    $gsdl_cgi->setup_gsdl(); 
    25  
    26     my $gsdlhome = $ENV{'GSDLHOME'}; 
     25    my $gsdlhome = $ENV{'GSDLHOME'}; 
     26 
    2727    $gsdl_cgi->checked_chdir($gsdlhome); 
    2828    require "$gsdlhome/perllib/util.pm";  # This is OK on Windows 
     
    3131    # Encrypt the password 
    3232    if (defined $gsdl_cgi->param("pw")) { 
    33     #$gsdl_cgi->param('-name' => "pw", '-value' => &Crypt::UnixCrypt::crypt($gsdl_cgi->clean_param("pw"), "Tp")); 
     33    $gsdl_cgi->param('-name' => "pw", '-value' => $gsdl_cgi->rot13($gsdl_cgi->clean_param("pw"))); 
    3434    } 
    3535 
     
    6767    $gsdl_cgi->delete("ts"); 
    6868 
    69     my $site= $gsdl_cgi->clean_param("site"); 
     69    my $site= $gsdl_cgi->clean_param("site");    
    7070    if (!defined $site) { 
    71     #$gsdl_cgi->generate_error("No site specified."); 
     71    $gsdl_cgi->generate_error("No site specified."); 
    7272    } 
    7373    $gsdl_cgi->delete("site"); 
     
    158158    my $java_command="$java -classpath \"$java_classpath\" org.greenstone.gsdl3.util.usersDB2txt \"$java_args\" 2>&1"; 
    159159    my $users_db_content = `$java_command`; 
    160      
     160 
    161161    # Get the user account information from the usersDB database 
    162162    my %users_db_data = (); 
     
    612612    } 
    613613 
    614     
    615614    # Zip up the collection file 
    616615    my $java = $gsdl_cgi->get_java_path();