Skip to content
This repository was archived by the owner on Nov 26, 2023. It is now read-only.

Unauthorized exception on GET request (due to space in query parameter value) #9

Closed
egarazlic opened this issue Jul 28, 2018 · 2 comments

Comments

@egarazlic
Copy link

Hi Brezzhnev.
I am trying to to create request to jira api to have users in group provided by name.

$res = $client->get('/rest/api/2/group?groupname=administrators&expand=users');

And this is working normaly.
But when I am trying to get users that are in group that has space in name like one I created.
"od vojeno" it is giving me the 401 resposne.
I have tried all those ways.

$res = $client->get('/rest/api/2/group?groupname=od vojeno&expand=users');

$res = $client->get('/rest/api/2/group?groupname=od+vojeno&expand=users');

$res = $client->get('/rest/api/2/group?groupname=od%20vojeno&expand=users');

$res= $client->get('/rest/api/2/group?groupname=od%20vojeno&expand=users');

$client->get('/rest/api/2/group',[
'query' => [
'groupname' => 'od vojeno',
],
]);
And all combinations with decoded/encoded parameter but cant make it run allways is 401 error

@breart
Copy link
Owner

breart commented Aug 10, 2018

The bug highly probable within the signature creating logic, you can debug it there:
https://github.com/brezzhnev/atlassian-connect-core/blob/master/src/Helpers/JWTHelper.php#L116

Will take a look as well when will be able.

@breart breart added the bug label Aug 10, 2018
@breart breart changed the title Group name with space Unauthorized exception on GET request (due to space in query parameter value) Aug 10, 2018
@breart
Copy link
Owner

breart commented Aug 14, 2018

Fixed in v1.2.3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants