glpi icon indicating copy to clipboard operation
glpi copied to clipboard

Password Grant validates without filling the form on swagger

Open orthagh opened this issue 1 year ago • 4 comments

The error returned by api.php/token endpoint:

{"status":"ERROR_INVALID_PARAMETER","title":"Invalid OAuth token","detail":"The JWT string must have two dots"}

The form although validated, doesn't conclude in a valid state, all other endpoints the same json error

orthagh avatar Oct 04 '24 08:10 orthagh

I cannot recreate the issue.

In Swagger UI, providing just login and password for password grant shows an error that there are fields missing. Providing all info authenticates properly in both Swagger UI and calls using Insomnia.

cconard96 avatar Oct 04 '24 09:10 cconard96

I don't know, In fact, I just tested without filling anything in the Password Grant form, no error are reported, and I pass on a "logged" state. I saw the two dots errors in POST response.

I didn't find any errors, in js console, nor in glpi logs.

orthagh avatar Oct 04 '24 09:10 orthagh

You may want to test on a fresh codespace I just launched/setup:

https://jubilant-palm-tree-xxq7w67443pj5r-8080.app.github.dev

In this case, I have the error reported (400), but the issue with "The JWT string must have two dots" is present. Maybe we can succeed in fixing this one

orthagh avatar Oct 04 '24 10:10 orthagh

to note Client credentials location = Request body is working

orthagh avatar Oct 04 '24 10:10 orthagh

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.

github-actions[bot] avatar Dec 04 '24 08:12 github-actions[bot]

Should have been fixed by #18010

cconard96 avatar Dec 04 '24 21:12 cconard96

Indeed fixed

orthagh avatar Dec 05 '24 09:12 orthagh