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

PDE-2584 fix(legacy-scripting-runner): default to auth fields if auth mapping is empty #438

Merged
merged 3 commits into from
Oct 27, 2021

Conversation

eliangcs
Copy link
Member

@eliangcs eliangcs commented Oct 27, 2021

Scenario to reproduce the issue

  • An empty auth mapping (legacy.authentication.mapping is {})
  • API Key or Session auth
  • Auth fields being {"api_key": "secret"}
  • Auth placement is querystring

Expected behavior

The request query params should have api_key:

{
  "url": "https://example.com",
  "params": {"api_key": "secret"}
}

Current behavior

The request query params have no api_key:

{
  "url": "https://example.com"
}

@eliangcs eliangcs marked this pull request as ready for review October 27, 2021 04:35
@eliangcs eliangcs requested a review from xavdid as a code owner October 27, 2021 04:35
Comment on lines +30 to +32
if (_.isEmpty(authMapping)) {
return authData;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the key of this change.

@eliangcs eliangcs merged commit 161eb87 into master Oct 27, 2021
@eliangcs eliangcs deleted the PDE-2854-empty-auth-mapping branch October 27, 2021 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants