Today I had the issue of not being able to login to my fedisocial.de instance anymore, which is authenticating against LDAP. Yesterday I switched to #glitchsoc and apparently it's either an issue with glitchsoc itself or with thet new base of Mastodon v4.6 beta.
If you are running the latest glitch-soc/Mastodon on Rails 8 / Ruby 3+ and your LDAP login suddenly breaks with an Error 500, you are likely hitting a
FrozenError.The Issue: FrozenError (can't modify frozen Hash) in app/models/concerns/user/ldap_authenticable.rb:61The Cause: OpenSSL::SSL::SSLContext::DEFAULT_PARAMS is now frozen by default. The .tap block trying to inject verify_mode directly triggers the crash.
The Fix: Create a mutable copy using .dup before calling .tap on the parameters:rubytls_options: OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.dup.tap { |options| options[:verify_mode] = OpenSSL::SSL::VERIFY_NONE if Devise.ldap_tls_no_verify },
Tested & works on my instance. Hope this saves someone a headache!
As I don't have any Github account anymore and there doesn't seem to be a mail address for bug reports... maybe a developer finds this...
#glitch #mastoadmin