Reputation: 83
This line of code in java is reported by sonar scan as a Security hotspot risk under Denial of Service (DoS) category.
name.matches("^.*[^a-zA-Z0-9 \\\\].*$")
How can I fix this? Is there an option to write this regular expression as a Java function?
Upvotes: 0
Views: 33