Commit 227ec822 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Add changelog entry

parent d90dcc29
---
title: Add different string encoding method in rack middleware
merge_request: 49044
author:
type: fixed
......@@ -93,7 +93,7 @@ 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.dup.force_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
......
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