diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-10 14:52:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-10 14:52:44 +0000 |
commit | 86a8eee1b8bd43a1fe962905eb97a1f478cc050b (patch) | |
tree | 439816bbaf4a0caf16d579223eb9465e0b0daebc /lib | |
parent | 1b517a5a19c4aafc6fa6d738b0ee7c1e4a2cce36 (diff) | |
download | gitlab-ce-86a8eee1b8bd43a1fe962905eb97a1f478cc050b.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-ee
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities/invitation.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/middleware/handle_malformed_strings.rb | 3 | ||||
-rw-r--r-- | lib/system_check/app/ruby_version_check.rb | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/entities/invitation.rb b/lib/api/entities/invitation.rb index 342f4804cf3..517b89529d7 100644 --- a/lib/api/entities/invitation.rb +++ b/lib/api/entities/invitation.rb @@ -4,7 +4,7 @@ module API module Entities class Invitation < Grape::Entity expose :access_level - expose :requested_at + expose :created_at expose :expires_at expose :invite_email expose :invite_token diff --git a/lib/gitlab/middleware/handle_malformed_strings.rb b/lib/gitlab/middleware/handle_malformed_strings.rb index 84f7e2e1b14..b966395ee32 100644 --- a/lib/gitlab/middleware/handle_malformed_strings.rb +++ b/lib/gitlab/middleware/handle_malformed_strings.rb @@ -93,7 +93,8 @@ module Gitlab # We try to encode the string from ASCII-8BIT to UTF8. If we failed to do # so for certain characters in the string, those chars are probably incomplete # multibyte characters. - string.encode(Encoding::UTF_8).match?(NULL_BYTE_REGEX) + string.dup.force_encoding(Encoding::UTF_8).match?(NULL_BYTE_REGEX) + rescue ArgumentError, Encoding::UndefinedConversionError # If we're here, we caught a malformed string. Return true true diff --git a/lib/system_check/app/ruby_version_check.rb b/lib/system_check/app/ruby_version_check.rb index 53da62df176..135413c528d 100644 --- a/lib/system_check/app/ruby_version_check.rb +++ b/lib/system_check/app/ruby_version_check.rb @@ -7,7 +7,7 @@ module SystemCheck set_check_pass -> { "yes (#{self.current_version})" } def self.required_version - @required_version ||= Gitlab::VersionInfo.new(2, 5, 3) + @required_version ||= Gitlab::VersionInfo.new(2, 7, 2) end def self.current_version |