Merge pull request #819 from henrikplate/fix-CVE-2023-50164

Fix CVE-2023-50164 in 2-3-x