]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/pages/account/TestChangePassword.java
Merge "Update notes about password security"
[gigi.git] / tests / org / cacert / gigi / pages / account / TestChangePassword.java
index 89d318e6e54e06c89fd0b8105fb366d75e395759..9601842631a1b639e730233458d43e6c87b7993a 100644 (file)
@@ -34,9 +34,10 @@ public class TestChangePassword extends ClientTest {
 
     @Test
     public void testChangePasswordWeb() throws IOException {
-        String error = executeBasicWebInteraction(cookie, path, "oldpassword=" + URLEncoder.encode(TEST_PASSWORD, "UTF-8") //
-                + "&pword1=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8")//
-                + "&pword2=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8"));
+        String error = executeBasicWebInteraction(cookie, path,
+                "oldpassword=" + URLEncoder.encode(TEST_PASSWORD, "UTF-8") //
+                        + "&pword1=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8")//
+                        + "&pword2=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8"));
         assertNull(error);
         assertTrue(isLoggedin(login(u.getEmail(), TEST_PASSWORD + "v2")));
         assertFalse(isLoggedin(login(u.getEmail(), TEST_PASSWORD)));
@@ -45,9 +46,10 @@ public class TestChangePassword extends ClientTest {
 
     @Test
     public void testChangePasswordWebOldWrong() throws IOException {
-        String error = executeBasicWebInteraction(cookie, path, "oldpassword=a" + URLEncoder.encode(TEST_PASSWORD, "UTF-8") //
-                + "&pword1=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8")//
-                + "&pword2=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8"));
+        String error = executeBasicWebInteraction(cookie, path,
+                "oldpassword=a" + URLEncoder.encode(TEST_PASSWORD, "UTF-8") //
+                        + "&pword1=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8")//
+                        + "&pword2=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8"));
         assertNotNull(error);
         assertFalse(isLoggedin(login(u.getEmail(), TEST_PASSWORD + "v2")));
         assertTrue(isLoggedin(login(u.getEmail(), TEST_PASSWORD)));
@@ -56,9 +58,10 @@ public class TestChangePassword extends ClientTest {
 
     @Test
     public void testChangePasswordWebNewWrong() throws IOException {
-        String error = executeBasicWebInteraction(cookie, path, "oldpassword=" + URLEncoder.encode(TEST_PASSWORD, "UTF-8") //
-                + "&pword1=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8")//
-                + "&pword2=a" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8"));
+        String error = executeBasicWebInteraction(cookie, path,
+                "oldpassword=" + URLEncoder.encode(TEST_PASSWORD, "UTF-8") //
+                        + "&pword1=" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8")//
+                        + "&pword2=a" + URLEncoder.encode(TEST_PASSWORD + "v2", "UTF-8"));
         assertNotNull(error);
         assertFalse(isLoggedin(login(u.getEmail(), TEST_PASSWORD + "v2")));
         assertTrue(isLoggedin(login(u.getEmail(), TEST_PASSWORD)));