Changeset 1476 for trunk


Ignore:
Timestamp:
12/03/19 14:08:11 (4 years ago)
Author:
bnemhaus
Message:

Added feedback to ensure that when attempting to use AuthRegainAccountAccess you provide a username.
Yikes, there is currently no guarantee that you are changing the correct person's password. This needs to be fixed.

Location:
trunk/src/org/expeditee/auth
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/auth/Actions.java

    r1452 r1476  
    301301                        // Confirm new requested passwords match
    302302                        Map<AuthenticationTag, String> userData = userdata.get();
    303                         if (!userData.get(AuthenticationTag.NewPassword).equals(userData.get(AuthenticationTag.NewPasswordAgain))) {
     303                        String username = userData.get(AuthenticationTag.Username).trim();
     304                        if (username.length() == 0) {
     305                                MessageBay.errorMessage("Please fill out the username box.");
     306                        } else if (!userData.get(AuthenticationTag.NewPassword).equals(userData.get(AuthenticationTag.NewPasswordAgain))) {
    304307                                MessageBay.errorMessage("The passwords you have provided do not match.");
    305                                 return;
    306                         }
    307                        
    308                         Password.regainAccountAccess(userData);
     308                        } else {
     309                                Password.regainAccountAccess(userData);
     310                        }
    309311                }
    310312        }
  • trunk/src/org/expeditee/auth/account/Password.java

    r1472 r1476  
    350350               
    351351                try {
     352                        // TODO: YIKES!  We can currently change anyone's password!
    352353                        AuthenticatorBrowser.getInstance().putKey(userData.get(AuthenticationTag.Username), userData.get(AuthenticationTag.NewPassword), new SecretKeySpec(join, SymmetricAlgorithm));
    353354                } catch (KeyStoreException | NoSuchAlgorithmException | CertificateException | ClassNotFoundException
Note: See TracChangeset for help on using the changeset viewer.