directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1362460 - /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/PasswordUtil.java
Date Tue, 17 Jul 2012 12:06:55 GMT
Author: pamarcelot
Date: Tue Jul 17 12:06:54 2012
New Revision: 1362460

URL: http://svn.apache.org/viewvc?rev=1362460&view=rev
Log:
Fix for DIRSERVER-1735 (When ads-pwdmaxage attribute is set to more then 2147483, then all
user passwords are expirer forever.).

Thanks to Oldrich Novak for providing the bug report and the fix.

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/PasswordUtil.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/PasswordUtil.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/PasswordUtil.java?rev=1362460&r1=1362459&r2=1362460&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/PasswordUtil.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/PasswordUtil.java
Tue Jul 17 12:06:54 2012
@@ -496,7 +496,7 @@ public class PasswordUtil
     {
         Date pwdChangeDate = DateUtils.getDate( pwdChangedZtime );
 
-        long time = pwdMaxAgeSec * 1000;
+        long time = ( ( long ) pwdMaxAgeSec ) * 1000L;
         time += pwdChangeDate.getTime();
 
         Date expiryDate = DateUtils.getDate( DateUtils.getGeneralizedTime( time ) );



Mime
View raw message