Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
227ec822
Commit
227ec822
authored
Dec 07, 2020
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add changelog entry
parent
d90dcc29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
changelogs/unreleased/285076-400-bad-request-during-authentication-due-to-password-format-lengt.yml
...st-during-authentication-due-to-password-format-lengt.yml
+5
-0
lib/gitlab/middleware/handle_malformed_strings.rb
lib/gitlab/middleware/handle_malformed_strings.rb
+1
-1
No files found.
changelogs/unreleased/285076-400-bad-request-during-authentication-due-to-password-format-lengt.yml
0 → 100644
View file @
227ec822
---
title
:
Add different string encoding method in rack middleware
merge_request
:
49044
author
:
type
:
fixed
lib/gitlab/middleware/handle_malformed_strings.rb
View file @
227ec822
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment