update dependencies, migrate RandomStringUtils

This commit is contained in:
2025-05-11 13:22:08 +02:00
parent ff38b12fa9
commit 3d38e7df1e
13 changed files with 22 additions and 22 deletions
@@ -179,9 +179,9 @@ public class ShortenedUrlManager implements SmartInitializingSingleton, UserData
if (StringUtils.hasText(code)) {
Assert.isTrue(!shortenedUrlRepository.existsById(code), "Given code already exists!");
} else {
code = RandomStringUtils.random(codeLength, true, true).toUpperCase();
code = RandomStringUtils.secure().next(codeLength, true, true).toUpperCase();
while (shortenedUrlRepository.existsById(code)) {
code = RandomStringUtils.random(codeLength, true, true).toUpperCase();
code = RandomStringUtils.secure().next(codeLength, true, true).toUpperCase();
}
}