Commit 2ce7ae03 authored by Vitor Meireles De Sousa's avatar Vitor Meireles De Sousa Committed by GitLab Release Tools Bot

Update non-negative integer regex to protect against regex DoS

parent fd79577a
---
title: Update NuGet regular expression to protect against ReDoS
merge_request:
author:
type: security
......@@ -15,7 +15,7 @@ module API
extend ActiveSupport::Concern
POSITIVE_INTEGER_REGEX = %r{\A[1-9]\d*\z}.freeze
NON_NEGATIVE_INTEGER_REGEX = %r{\A0|[1-9]\d*\z}.freeze
NON_NEGATIVE_INTEGER_REGEX = %r{\A(0|[1-9]\d*)\z}.freeze
included do
helpers do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment