Commit 5a9daf91 authored by GitLab Release Tools Bot's avatar GitLab Release Tools Bot

Merge branch 'security-nuget-api-regex-dos' into 'master'

Update non-negative integer regex to protect against regex DoS

See merge request gitlab-org/security/gitlab!1127
parents 344f7d39 2ce7ae03
---
title: Update NuGet regular expression to protect against ReDoS
merge_request:
author:
type: security
...@@ -15,7 +15,7 @@ module API ...@@ -15,7 +15,7 @@ module API
extend ActiveSupport::Concern extend ActiveSupport::Concern
POSITIVE_INTEGER_REGEX = %r{\A[1-9]\d*\z}.freeze 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 included do
helpers 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