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

SDKS-1408 Discrepancies between Android and iOS behavior upon registering OATH account (Issuer param) #161

Merged
merged 1 commit into from
May 16, 2022

Conversation

rodrigoareis
Copy link
Contributor

JIRA Ticket

SDKS-1408 Discrepancies between Android and iOS behavior upon registering OATH account (Issuer param)

Description

While registering a new mechanism, if "issuer" is empty on the query parameter of the URI, but available in the path, the SDK should not throw exception. Instead, it should use the issue in the path.

Definition of Done Checklist:

  • Acceptance criteria is met.
  • All tasks listed in the user story have been completed.
  • Coded to standards.
  • Ensure backward compatibility.
  • API reference docs is updated.
  • Unit tests are written.
  • Integration tests are written.
  • e2e tests are written.
  • Functional spec is written/updated.
  • contains example code snippets.
  • Change log updated.
  • Documentation story is created and tracked.
  • Tech debts and remaining tasks are tracked in separated ticket(s).

Copy link
Contributor

@spetrov spetrov left a comment

Choose a reason for hiding this comment

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

Looks good to me!
I tested the fix using the steps from the problem description in SDKS-1408 and confirmed that the issue no longer occurs... i.e. when "issuer" is empty on the query parameter of the URI but available in the path, the SDK no longer throws an exception.

@@ -93,6 +93,9 @@ private Map<String, String> map(URI uri) throws MechanismParsingException {
for (String query : queryParts) {
String[] split = split(query, "=");
if (split != null) {
if (split[0].equals(ISSUER) && split[1].isEmpty()) {
Copy link
Contributor

@jeyanthanperiyasamy jeyanthanperiyasamy May 16, 2022

Choose a reason for hiding this comment

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

on previous line can we check this as well - if (split != null && split.length > 1) . just for safer side to avoid index out of bounds

Copy link
Contributor

@jeyanthanperiyasamy jeyanthanperiyasamy left a comment

Choose a reason for hiding this comment

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

minor

@spetrov spetrov merged commit 69fb82c into develop May 16, 2022
@spetrov spetrov deleted the SDKS-1408 branch May 16, 2022 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants