Bring back Gitlab::UntrustedRegexp.with_fallback

What does this MR do?

Fixes #10864 (closed)

Bring back Gitlab::UntrustedRegexp.with_fallback as it's still being called in PushRule model.

Also still present in 11-9-stable-ee branch which was release as 11.9.4. This commit in 11-9-stable-ee branch (https://gitlab.com/gitlab-org/gitlab-ee/commit/c5ae609534cf5cf75a13b066f2569ae4fb88761d) doesn't remove the with_fallback method.

That commit includes other changes though which is unrelated so I just copy pasted back with_fallback based on https://gitlab.com/gitlab-org/gitlab-ee/blob/11-9-stable-ee/lib/gitlab/untrusted_regexp.rb#L50-61.

What are the relevant issue numbers?

#10864 (closed)

Does this MR meet the acceptance criteria?

Edited by Kamil Trzciński

Merge request reports

Loading