Error when adding a LDAP Auth Source
I have this error (see screenshot) when adding an ldap source. I am using a recent nightly build. 1.7.0-develop. Unfortunatell I can`t provide more information.
#1 Updated by Dominic Cleal over 4 years ago
- Legacy Backlogs Release (now unused) deleted (
Looks like it's due to https://github.com/rails/rails/issues/7837
In a couple of places in app/controllers/application_controller.rb we test request.format, but it may be nil. We should use
request.format.try(:json?) or check for nil explicitly.
To reproduce, add
?format=weird to the request URL on any page. I can't think why this would be affecting the LDAP page in particular.
#3 Updated by Dominic Cleal over 4 years ago
Ah, I see how to reproduce it!
1. add an LDAP auth source called "test.foo" (e.g. server: ldap.forumsys.com)
2. edit the LDAP auth source + save
The "test.foo" is part of the URL because it's the identifier for the auth source, but ".foo" causes Rails to interpret that as the request format. That's potentially dangerous, if you added "test.yaml" it might cause a formatting change.. we should probably remove "." from the resource identifiers?
Setting back to 1.7.0 as I guess this might be a friendly_id related regression.