Summary: | Error 500 when loading identity provider list | ||
---|---|---|---|
Product: | Koha | Reporter: | Hammat wele <hammat.wele> |
Component: | System Administration | Assignee: | Hammat wele <hammat.wele> |
Status: | Pushed to oldstable --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, david, fridolin.somers, gmcharlt, lucas, nick, philippe.blouin, wainuiwitikapark |
Version: | Main | Keywords: | additional_work_needed |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the listing of identity providers (Administration > Additional parameters > Identity providers) when special characters are used in the configuration and mapping fields (such as "scope": "élève"). Previously, using special characters in these fields caused a 500 error when viewing the Administration > Identity providers page.
|
Version(s) released in: |
24.11.00,24.05.02,23.11.07
|
Circulation function: | |||
Attachments: |
Bug 37157: Fix Malformed UTF-8 character in JSON string before decode_json
Bug 37157: Fix Malformed UTF-8 character in JSON string before decode_json Bug 37157: Fix Malformed UTF-8 character in JSON string before decode_json |
Description
Hammat wele
2024-06-21 16:39:08 UTC
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 |