Error in GetCredentials^OAUTH2.ZAUTHENTICATE.mac

Open Beginner friendly
#12 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet

Research direction

Start at GetCredentials in OAUTH2.ZAUTHENTICATE.mac and inspect the %request.Data call highlighted in the issue. Reproduce or trace the request-state lookup, then verify the routine handles the session query parameter correctly without losing the state value.

Written by the indexing model from the issue text.

Description

If I had a dollar for every time someone forgets the ,1) on %request.Data(...

This line:
if ServiceName="%Service_WebGateway",$data(%request.Data(##class(%OAuth2.Login).#SessionQueryParameter),state) {
Should be something like:

if ServiceName="%Service_WebGateway" {
  set sessionQueryParameter = ##class(%OAuth2.Login).#SessionQueryParameter
  set state = $get(%request.Data(sessionQueryParameter,1))
  if state '= "" {
       ...
  }
Dominant language
ObjectScript
Stars
10
Forks
15
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intersystems/Samples-Security

All issues in intersystems/Samples-Security

Similar issues

More Security issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.