When we add a new identity provider and put some special characters in the Config or Mapping field, we got 500 error when we list the identity providers
Created attachment 167974 [details] [review] Bug 37157: Fix Malformed UTF-8 character in JSON string before decode_json When we add a new identity provider and put some special characters in the Config or Mapping field, we got 500 error when we list the identity providers To test: 1. Apply this patch. 2. Add a new identity provider 2.1. fill the form 2.2. click on «Add default Oauth configuration» and on «Add default Oauth mapping» 2.3. put some special characters in Configuration and Mapping field 3. Save the form => Confirm the identity providers list is shown correctly Also prove t/db_dependent/api/v1/provider.t.
Created attachment 168009 [details] [review] Bug 37157: Fix Malformed UTF-8 character in JSON string before decode_json When we add a new identity provider and put some special characters in the Config or Mapping field, we got 500 error when we list the identity providers To test: 1. Apply this patch. 2. Add a new identity provider 2.1. fill the form 2.2. click on «Add default Oauth configuration» and on «Add default Oauth mapping» 2.3. put some special characters in Configuration and Mapping field 3. Save the form => Confirm the identity providers list is shown correctly Also prove t/db_dependent/api/v1/provider.t. Signed-off-by: David Nind <david@davidnind.com>
Hi Hammat. 1. I used these values: OATH configuration: ... "scope": "élève" ... OATH mapping: ... "surname": "élève" ... Note: At the moment I can't edit a provider, so I will add a bug for that if there isn't one.
(In reply to David Nind from comment #3) > Hi Hammat. > Note: At the moment I can't edit a provider, so I will add a bug for that if > there isn't one. Hi David, you're right we can't also edit a provider. the form is empty and we got an error when submitting > so I will add a bug for that if there isn't one. Good idea
It's Bug 36276 - Cannot edit Identity Provider after creation (had already been created).
Created attachment 168176 [details] [review] Bug 37157: Fix Malformed UTF-8 character in JSON string before decode_json When we add a new identity provider and put some special characters in the Config or Mapping field, we got 500 error when we list the identity providers To test: 1. Apply this patch. 2. Add a new identity provider 2.1. fill the form 2.2. click on «Add default Oauth configuration» and on «Add default Oauth mapping» 2.3. put some special characters in Configuration and Mapping field 3. Save the form => Confirm the identity providers list is shown correctly Also prove t/db_dependent/api/v1/provider.t. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
One issue is that if I create the provider before this request. this doesn't fix it. I have to delete them from the database in order to be able to load. Could we have a DB update to fix/encode existing values?
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.02
Pushed to 23.11.x for 23.11.07
Have added a release note. Is additional work still required? See comment #7. I've added additional_work_needed - please remove if this is no longer the case.
Not backporting to 23.05.x unless requested
(In reply to Nick Clemens (kidclamp) from comment #7) > One issue is that if I create the provider before this request. this doesn't > fix it. I have to delete them from the database in order to be able to load. > Could we have a DB update to fix/encode existing values? This would still be nice to have. Opened bug 38447.