← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17098: Minor

 

------------------------------------------------------------
revno: 17098
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-10-14 08:46:36 +0200
message:
  Minor
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java	2014-10-07 21:16:53 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java	2014-10-14 06:46:36 +0000
@@ -320,7 +320,7 @@
 
         if ( currentTime.after( restoreExpiry ) )
         {
-            return "date_is_after_expiry - date: " + currentTime.toString() + " expiry: " + restoreExpiry.toString();
+            return "date_is_after_expiry";
         }
 
         return null; // Success;
@@ -361,10 +361,10 @@
      *     <li>credentials_parameter_is_null</li>
      *     <li>token_parameter_is_null</li>
      *     <li>restore_type_parameter_is_null</li>
-     *     <li>cannot_parse_restore_options ...</li>
-     *     <li>wrong_prefix_for_restore_type ...</li>
-     *     <li>could_not_verify_token ...</li>
-     *     <li>restore_token_does_not_match_supplied_token ...</li>
+     *     <li>cannot_parse_restore_options</li>
+     *     <li>wrong_prefix_for_restore_type</li>
+     *     <li>could_not_verify_token</li>
+     *     <li>restore_token_does_not_match_supplied_token</li>
      * </ul>
      *
      * @param credentials the user credentials.
@@ -393,24 +393,24 @@
 
         if ( restoreOptions == null )
         {
-            return "cannot_parse_restore_options for " + restoreType.name() + " from token " + token;
+            return "cannot_parse_restore_options";
         }
 
         if ( restoreType != restoreOptions.getRestoreType() )
         {
-            return "wrong_prefix_for_restore_type " + restoreType.name() + " on token " + token;
+            return "wrong_prefix_for_restore_type";
         }
 
         String restoreToken = credentials.getRestoreToken();
 
         if ( restoreToken == null )
         {
-            return "could_not_verify_token for " + restoreType.name() + " because user has no token";
+            return "could_not_verify_token";
         }
 
         boolean validToken = passwordManager.matches( token, restoreToken );
 
-        return validToken ? null : "restore_token_does_not_match_supplied_token " + token;
+        return validToken ? null : "restore_token_does_not_match_supplied_token";
     }
 
     @Override