Is RegEx safe from the user?

I am working on an application that should accept RegEx from the user, for this I use the following code:

Regex user_searchPattern = new Regex(this.userInput_regEx.Text);

Does it safe?
Does user input need to be misinformed, and if so, how?

+3
source share
2 answers

You may receive an error message if the regular expression has invalid syntax or it can consume an exponential amount of time and space during processing if the so-called pathological regular expression is checked on a certain line.

+9
source

. "". , - ? , , , , .

0

Source: https://habr.com/ru/post/1708400/


All Articles