@@ -690,7 +690,7 @@ class AccountResourceIT {
690690< % _ } _% >
691691 user .setLogin (" activate-account" );
692692 user .setEmail (" activate-account@example.com" );
693- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
693+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
694694 user .setActivated (false );
695695 user .setActivationKey (activationKey);
696696< % _ if (databaseTypeSql && reactive) { _% >
@@ -741,7 +741,7 @@ class AccountResourceIT {
741741< % _ } _% >
742742 user .setLogin (" save-account" );
743743 user .setEmail (" save-account@example.com" );
744- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
744+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
745745 user .setActivated (true );
746746< % _ if (databaseTypeSql && reactive) { _% >
747747 user .setCreatedBy (Constants .SYSTEM );
@@ -802,7 +802,7 @@ class AccountResourceIT {
802802< % _ } _% >
803803 user .setLogin (" save-invalid-email" );
804804 user .setEmail (" save-invalid-email@example.com" );
805- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
805+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
806806 user .setActivated (true );
807807< % _ if (databaseTypeSql && reactive) { _% >
808808 user .setCreatedBy (Constants .SYSTEM );
@@ -857,7 +857,7 @@ class AccountResourceIT {
857857< % _ } _% >
858858 user .setLogin (" save-existing-email" );
859859 user .setEmail (" save-existing-email@example.com" );
860- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
860+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
861861 user .setActivated (true );
862862< % _ if (databaseTypeSql && reactive) { _% >
863863 user .setCreatedBy (Constants .SYSTEM );
@@ -870,7 +870,7 @@ class AccountResourceIT {
870870< % _ } _% >
871871 anotherUser .setLogin (" save-existing-email2" );
872872 anotherUser .setEmail (" save-existing-email2@example.com" );
873- anotherUser .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
873+ anotherUser .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
874874 anotherUser .setActivated (true );
875875< % _ if (databaseTypeSql && reactive) { _% >
876876 anotherUser .setCreatedBy (Constants .SYSTEM );
@@ -924,7 +924,7 @@ class AccountResourceIT {
924924< % _ } _% >
925925 user .setLogin (" save-existing-email-and-login" );
926926 user .setEmail (" save-existing-email-and-login@example.com" );
927- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
927+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
928928 user .setActivated (true );
929929< % _ if (databaseTypeSql && reactive) { _% >
930930 user .setCreatedBy (Constants .SYSTEM );
@@ -974,7 +974,7 @@ class AccountResourceIT {
974974< % _ if (databaseTypeCassandra) { _% >
975975 user .setId (UUID .randomUUID ().toString ());
976976< % _ } _% >
977- String currentPassword = RandomStringUtils .randomAlphanumeric (60 );
977+ String currentPassword = RandomStringUtils .insecure (). nextAlphanumeric (60 );
978978 user .setPassword (passwordEncoder .encode (currentPassword));
979979 user .setLogin (" change-password-wrong-existing-password" );
980980 user .setEmail (" change-password-wrong-existing-password@example.com" );
@@ -1015,7 +1015,7 @@ class AccountResourceIT {
10151015< % _ if (databaseTypeCassandra) { _% >
10161016 user .setId (UUID .randomUUID ().toString ());
10171017< % _ } _% >
1018- String currentPassword = RandomStringUtils .randomAlphanumeric (60 );
1018+ String currentPassword = RandomStringUtils .insecure (). nextAlphanumeric (60 );
10191019 user .setPassword (passwordEncoder .encode (currentPassword));
10201020 user .setLogin (" change-password" );
10211021 user .setEmail (" change-password@example.com" );
@@ -1055,7 +1055,7 @@ class AccountResourceIT {
10551055< % _ if (databaseTypeCassandra) { _% >
10561056 user .setId (UUID .randomUUID ().toString ());
10571057< % _ } _% >
1058- String currentPassword = RandomStringUtils .randomAlphanumeric (60 );
1058+ String currentPassword = RandomStringUtils .insecure (). nextAlphanumeric (60 );
10591059 user .setPassword (passwordEncoder .encode (currentPassword));
10601060 user .setLogin (" change-password-too-small" );
10611061 user .setEmail (" change-password-too-small@example.com" );
@@ -1064,7 +1064,7 @@ class AccountResourceIT {
10641064< % _ } _% >
10651065 userRepository .save < % if (databaseTypeSql && ! reactive) { % > AndFlush< % } % > (user)< % if (reactive) { % > .block ()< % } % > ;
10661066
1067- String newPassword = RandomStringUtils .random (ManagedUserVM .PASSWORD_MIN_LENGTH - 1 );
1067+ String newPassword = RandomStringUtils .insecure (). next (ManagedUserVM .PASSWORD_MIN_LENGTH - 1 );
10681068
10691069< % _ if (reactive) { _% >
10701070 accountWebTestClient .post ().uri (" /api/account/change-password" )
@@ -1097,7 +1097,7 @@ class AccountResourceIT {
10971097< % _ if (databaseTypeCassandra) { _% >
10981098 user .setId (UUID .randomUUID ().toString ());
10991099< % _ } _% >
1100- String currentPassword = RandomStringUtils .randomAlphanumeric (60 );
1100+ String currentPassword = RandomStringUtils .insecure (). nextAlphanumeric (60 );
11011101 user .setPassword (passwordEncoder .encode (currentPassword));
11021102 user .setLogin (" change-password-too-long" );
11031103 user .setEmail (" change-password-too-long@example.com" );
@@ -1106,7 +1106,7 @@ class AccountResourceIT {
11061106< % _ } _% >
11071107 userRepository .save < % if (databaseTypeSql && ! reactive) { % > AndFlush< % } % > (user)< % if (reactive) { % > .block ()< % } % > ;
11081108
1109- String newPassword = RandomStringUtils .random (ManagedUserVM .PASSWORD_MAX_LENGTH + 1 );
1109+ String newPassword = RandomStringUtils .insecure (). next (ManagedUserVM .PASSWORD_MAX_LENGTH + 1 );
11101110
11111111< % _ if (reactive) { _% >
11121112 accountWebTestClient .post ().uri (" /api/account/change-password" )
@@ -1139,7 +1139,7 @@ class AccountResourceIT {
11391139< % _ if (databaseTypeCassandra) { _% >
11401140 user .setId (UUID .randomUUID ().toString ());
11411141< % _ } _% >
1142- String currentPassword = RandomStringUtils .randomAlphanumeric (60 );
1142+ String currentPassword = RandomStringUtils .insecure (). nextAlphanumeric (60 );
11431143 user .setPassword (passwordEncoder .encode (currentPassword));
11441144 user .setLogin (" change-password-empty" );
11451145 user .setEmail (" change-password-empty@example.com" );
@@ -1180,7 +1180,7 @@ class AccountResourceIT {
11801180 < % _ if (databaseTypeCassandra) { _% >
11811181 user .setId (UUID .randomUUID ().toString ());
11821182 < % _ } _% >
1183- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
1183+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
11841184 user .setLogin (" current-sessions" );
11851185 user .setEmail (" current-sessions@example.com" );
11861186 < % _ if (databaseTypeSql && reactive) { _% >
@@ -1229,7 +1229,7 @@ class AccountResourceIT {
12291229 < % _ if (databaseTypeCassandra) { _% >
12301230 user .setId (UUID .randomUUID ().toString ());
12311231 < % _ } _% >
1232- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
1232+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
12331233 user .setLogin (" invalidate-session" );
12341234 user .setEmail (" invalidate-session@example.com" );
12351235 < % _ if (databaseTypeSql && reactive) { _% >
@@ -1277,7 +1277,7 @@ class AccountResourceIT {
12771277< % _ if (databaseTypeCassandra) { _% >
12781278 user .setId (UUID .randomUUID ().toString ());
12791279< % _ } _% >
1280- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
1280+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
12811281 user .setActivated (true );
12821282 user .setLogin (" password-reset" );
12831283 user .setEmail (" password-reset@example.com" );
@@ -1312,7 +1312,7 @@ class AccountResourceIT {
13121312< % _ if (databaseTypeCassandra) { _% >
13131313 user .setId (UUID .randomUUID ().toString ());
13141314< % _ } _% >
1315- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
1315+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
13161316 user .setActivated (true );
13171317 user .setLogin (" password-reset-upper-case" );
13181318 user .setEmail (" password-reset-upper-case@example.com" );
@@ -1364,7 +1364,7 @@ class AccountResourceIT {
13641364< % _ if (databaseTypeCassandra) { _% >
13651365 user .setId (UUID .randomUUID ().toString ());
13661366< % _ } _% >
1367- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
1367+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
13681368 user .setLogin (" finish-password-reset" );
13691369 user .setEmail (" finish-password-reset@example.com" );
13701370 user .setResetDate (Instant .now ().plusSeconds (60 ));
@@ -1408,7 +1408,7 @@ class AccountResourceIT {
14081408< % _ if (databaseTypeCassandra) { _% >
14091409 user .setId (UUID .randomUUID ().toString ());
14101410< % _ } _% >
1411- user .setPassword (RandomStringUtils .randomAlphanumeric (60 ));
1411+ user .setPassword (RandomStringUtils .insecure (). nextAlphanumeric (60 ));
14121412 user .setLogin (" finish-password-reset-too-small" );
14131413 user .setEmail (" finish-password-reset-too-small@example.com" );
14141414 user .setResetDate (Instant .now ().plusSeconds (60 ));
0 commit comments