[vhffs-dev] [833] Delete stupid regexp on mail password

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 833
Author:   gradator
Date:     2007-08-30 17:02:03 +0000 (Thu, 30 Aug 2007)

Log Message:
-----------
Delete stupid regexp on mail password

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Services/Mail.pm
    trunk/vhffs-backend/conf/vhffs.conf.dist.in


Modified: trunk/vhffs-api/src/Vhffs/Services/Mail.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Mail.pm	2007-08-30 16:51:14 UTC (rev 832)
+++ trunk/vhffs-api/src/Vhffs/Services/Mail.pm	2007-08-30 17:02:03 UTC (rev 833)
@@ -166,7 +166,7 @@
 	my $local_part = shift;
 	my $password = shift;
 
-	return -1 unless( defined( $self->{'boxes'}{$local_part} ) && ( $password =~ /^[a-zA-Z0-9\_\-]+$/ ) );
+	return -1 unless defined $self->{'boxes'}{$local_part};
 
     $password = crypt_pwd( $password );
 
@@ -281,7 +281,7 @@
 	my $name = shift;
 	my $password = shift;
 
-    return -1 unless(defined($password) && defined($name) && $name =~ /^[a-z0-9\_\-\.]+$/ && $password =~ /^[a-zA-Z0-9\_\-]+$/);
+    return -1 unless( defined($password)  &&  defined($name)  &&  $name =~ /^[a-z0-9\_\-\.]+$/ );
     return -2 if( ( defined ( $self->{'boxes'}{$name} ) ) || ( defined( $self->{'forward'}{$name} ) ) 
         || Vhffs::Services::MailingList::address_exists($self->get_main, $name, $self->{domain}) );
 

Modified: trunk/vhffs-backend/conf/vhffs.conf.dist.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.dist.in	2007-08-30 16:51:14 UTC (rev 832)
+++ trunk/vhffs-backend/conf/vhffs.conf.dist.in	2007-08-30 17:02:03 UTC (rev 833)
@@ -131,8 +131,8 @@
 	mingid			=	@MINGID@
 	bad_username_file	=	@CONFDIR@/bl_username
 	bad_groupname_file	=	@CONFDIR@/bl_groupname
-	available_shells	=	/bin/bash /bin/tcsh /bin/zsh /bin/tuxshell
-	default_shell		=	/bin/bash
+	available_shells	=	/bin/bash /bin/tcsh /bin/zsh /bin/false
+	default_shell		=	/bin/false
 	default_quota		=	10
 
 	#Notation is useful to handle aggressive users


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/