Revision: 7525 http://sourceforge.net/p/ipcop/svn/7525 Author: owes Date: 2014-05-06 18:56:31 +0000 (Tue, 06 May 2014) Log Message: ----------- Replace htpasswd binary.
Modified Paths: -------------- ipcop/trunk/html/cgi-bin/changepw.cgi ipcop/trunk/updates/2.1.6/ROOTFILES.i486-2.1.6 Modified: ipcop/trunk/html/cgi-bin/changepw.cgi =================================================================== --- ipcop/trunk/html/cgi-bin/changepw.cgi 2014-05-06 18:44:10 UTC (rev 7524) +++ ipcop/trunk/html/cgi-bin/changepw.cgi 2014-05-06 18:56:31 UTC (rev 7525) @@ -27,6 +27,7 @@ # Make sure translation exists $Lang::tr{'sspasswords'} use strict; +use Apache::Htpasswd; # enable only the following on debugging purpose #use warnings; @@ -57,7 +58,9 @@ $error_admin = 'error'; } elsif (length($password1) >= 6) { - if (system('/usr/sbin/htpasswd', '-m', '-b', '/var/ipcop/auth/users', 'admin', "${password1}")) { + my $htpasswd = new Apache::Htpasswd('/var/ipcop/auth/users', UseMD5 => 1); + $htpasswd->htDelete('admin'); + if (!$htpasswd->htpasswd('admin', $cgiparams{'ADMIN_PASSWORD1'})) { $errormessage = $Lang::tr{'errmsg change fail'}; $error_admin = 'error'; } @@ -85,7 +88,9 @@ $error_dial = 'error'; } elsif (length($password1) >= 6) { - if (system('/usr/sbin/htpasswd', '-m', '-b', '/var/ipcop/auth/users', 'dial', "${password1}")) { + my $htpasswd = new Apache::Htpasswd('/var/ipcop/auth/users', UseMD5 => 1); + $htpasswd->htDelete('dial'); + if (!$htpasswd->htpasswd('dial', $cgiparams{'DIAL_PASSWORD1'})) { $errormessage = $Lang::tr{'errmsg change fail'}; $error_dial = 'error'; } Modified: ipcop/trunk/updates/2.1.6/ROOTFILES.i486-2.1.6 =================================================================== --- ipcop/trunk/updates/2.1.6/ROOTFILES.i486-2.1.6 2014-05-06 18:44:10 UTC (rev 7524) +++ ipcop/trunk/updates/2.1.6/ROOTFILES.i486-2.1.6 2014-05-06 18:56:31 UTC (rev 7525) @@ -2,6 +2,7 @@ /etc/logrotate.d/squid /etc/logrotate.d/squidGuard /etc/rc.d/rc.sysinit +/home/httpd/cgi-bin/changepw.cgi /home/httpd/cgi-bin/proxy.cgi /usr/local/bin/restarthttpd /usr/local/bin/setreservedports.pl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn