Skip to content

Commit 58df0fc

Browse files
committed
πŸ› Prevent key duplication in symbolize_hash_keys
1 parent 3d61662 commit 58df0fc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Please file a bug if you notice a violation of semantic versioning.
4141

4242
### Fixed
4343

44+
- Prevent key duplication in symbolize_hash_keys
45+
4446
### Security
4547

4648
## [2.3.0-gl] (gitlab fork) - 2025-08-20

β€Žlib/omniauth-ldap/adaptor.rbβ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,9 @@ def sanitize_hash_values(hash)
246246
end
247247

248248
def symbolize_hash_keys(hash)
249-
hash.keys.each do |key|
250-
hash[key.to_sym] = hash[key]
249+
hash.each_with_object({}) do |(key, value), result|
250+
result[key.to_sym] = value
251251
end
252-
253-
hash
254252
end
255253
end
256254
end

0 commit comments

Comments
Β (0)