[vhffs-dev] [2274] 1h is 5 hashes, not 4

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


Revision: 2274
Author:   gradator
Date:     2015-02-23 08:20:06 +0100 (Mon, 23 Feb 2015)
Log Message:
-----------
1h is 5 hashes, not 4

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Auth.pm

Modified: trunk/vhffs-api/src/Vhffs/Panel/Auth.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Auth.pm	2015-02-22 23:44:09 UTC (rev 2273)
+++ trunk/vhffs-api/src/Vhffs/Panel/Auth.pm	2015-02-23 07:20:06 UTC (rev 2274)
@@ -193,11 +193,11 @@
 
 	# allow auth code for 1h to 1h15
 	my $i;
-	for ($i = 0; $i < 4; $i++) {
+	for ($i = 0; $i < 5; $i++) {
 		last if Digest::MD5::md5_hex($user->get_password.$t) eq $auth;
-		$t -= 900;
+		$t -= 900; # 15min
 	}
-	goto FAIL if $i == 4;
+	goto FAIL if $i == 5;
 
 	# create a new password for this user
 	my $password = Vhffs::Functions::generate_random_password();


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