gunnar: server/perl-kolab/bin kolabpasswd.in,1.4,1.5

cvs at kolab.org cvs at kolab.org
Tue Jan 5 18:46:02 CET 2010


Author: gunnar

Update of /kolabrepository/server/perl-kolab/bin
In directory doto:/tmp/cvs-serv1015/bin

Modified Files:
	kolabpasswd.in 
Log Message:
MFB: kolab/issue919  (kolab server has problems with some characters in passwords). While the patches actually did not solve the problem they also did not make it worse. They simply inverted the problem and you get double encoded UTF-8 characters in passwords now when using UTF-8 only. So this was merged from the kolab_2_2_branch to have the same state in both branches.

Index: kolabpasswd.in
===================================================================
RCS file: /kolabrepository/server/perl-kolab/bin/kolabpasswd.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- kolabpasswd.in	5 Jan 2010 12:48:04 -0000	1.4
+++ kolabpasswd.in	5 Jan 2010 17:46:00 -0000	1.5
@@ -140,6 +140,8 @@
   ReadMode 'noecho';
   my $old_password = ReadLine 0; chomp $old_password;
 
+  $old_password = Encode::encode_utf8($old_password);
+
   $mesg = $ldap->bind( $account_dn, password => $old_password ) || die "\nkolabpasswd: Failed to bind to LDAP server";
   if( $mesg->code ) { print "\nError: ".$mesg->error.". Please try again\n"; }
 } while ( $mesg->code );
@@ -154,6 +156,8 @@
 print "\n";
 ReadMode 'normal';
 ($new_password eq $new_password2) || die "Sorry, passwords do not match.\n";
+
+$new_password = Encode::encode_utf8($new_password);
 
 my $bind_pw_hash;
 





More information about the commits mailing list