Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JWT QSH generation for urls with repeated parameters #1157

Merged
merged 4 commits into from Sep 26, 2021

Conversation

robinhughes
Copy link
Contributor

  • Fix QshGenerator to combine repeated query string parameters into csv
  • add test for QshGenerator.generate_qsh

This fixes an issue where e.g. search_issues(jql, fields=["field1", "field2"]) would fail to authenticate because the generated qsh was invalid. The url requested is like ...&fields=field1&fields=field2&.... These repeated parameters must be combined into a single csv parameter according to https://developer.atlassian.com/cloud/jira/platform/understanding-jwt-for-connect-apps/#qsh when computing the QSH for JWT auth.

Copy link
Collaborator

@adehad adehad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! There's a problem with our github actions pipeline at the moment so it may fail, I'll try and sort this out soon so we can get this merged.

tests/test_qsh.py Outdated Show resolved Hide resolved
@adehad adehad added the bug label Sep 24, 2021
@adehad
Copy link
Collaborator

adehad commented Sep 24, 2021

Ah lint failing might be because we've updated our lint steps, try merging in master before running tox -e lint again !

@adehad adehad merged commit caa1a8c into pycontribs:master Sep 26, 2021
@adehad
Copy link
Collaborator

adehad commented Sep 26, 2021

Thank you for your contribution !

svermeulen pushed a commit to svermeulen/jira that referenced this pull request Oct 31, 2021
…1157)

* Fix QshGenerator to combine repeated query string parameters into csv
* add test for QshGenerator.generate_qsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants