TODO für potentielle SQL-Injection

This commit is contained in:
Michael Hoennig 2024-12-13 10:09:58 +01:00
parent a0560d2bfd
commit 0ebaec6908

View File

@ -35,6 +35,7 @@ public interface HsOfficeContactRbacRepository extends Repository<HsOfficeContac
} }
static String emailRegEx(@NotNull String emailAddress) { static String emailRegEx(@NotNull String emailAddress) {
// TODO.impl: find more secure solution, maybe we substitute a placeholder with the whole expression?
if (emailAddress.contains("'") || emailAddress.endsWith("\\") ) { if (emailAddress.contains("'") || emailAddress.endsWith("\\") ) {
throw new ValidationException( throw new ValidationException(
"emailAddress contains invalid characters: " + emailAddress); "emailAddress contains invalid characters: " + emailAddress);