From 137b41cf385348da84649b31577e8e818f0500d1 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Fri, 23 Apr 2021 03:02:24 +0000 Subject: [PATCH] Ruby 2.7: FrozenError when new LDAP users try to login (#35135). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@20966 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/auth_source_ldap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb index 623359531..8ed7ce27f 100644 --- a/app/models/auth_source_ldap.rb +++ b/app/models/auth_source_ldap.rb @@ -247,7 +247,7 @@ class AuthSourceLdap < AuthSource def get_attr(entry, attr_name) if !attr_name.blank? value = entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name] - value.to_s.force_encoding('UTF-8') + (+value.to_s).force_encoding('UTF-8') end end end