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

Mojaloop Oracle Simulator is not correctly filtering results when SubId request param is provided #2373

Closed
mdebarros opened this issue Aug 6, 2021 · 2 comments
Assignees
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Milestone

Comments

@mdebarros
Copy link
Member

mdebarros commented Aug 6, 2021

Summary:
Mojaloop Oracle Simulator is not correctly filtering results when SubId request param is provided.

$ curl http://localhost:8080/oracle/participants/MSISDN/27713803912\?SubId=30
{"partyList":[{"fspId":"payeefsp","currency":"USD"},{"fspId":"payeefsp","currency":"USD","partySubIdOrType":"30"}]}

The above result incorrectly returns the first record {"fspId":"payeefsp","currency":"USD"} which dos not contain a match partySubIdOrType=30 (unlike the 2nd result).

Severity:
Low

Priority:
Low

Expected Behavior

In the above example only the record with matching partySubIdOrType=30 should be returned:

$ curl http://localhost:8080/oracle/participants/MSISDN/27713803912\?SubId=30
{"partyList":[{"fspId":"payeefsp","currency":"USD","partySubIdOrType":"30"}]}

Steps to Reproduce

  1. Ensure that there is a record created on Oracle for the same PartyType-PartyId with and without a SubId
  2. Send CURL command like the example above for that participant

Specifications

  • Component (if known): Mojaloop-Simulator
  • Version: v11.4.3
  • Platform: moja1
  • Subsystem: n/a
  • Type of testing: manual
  • Bug found/raised by: @mdebarros

Notes:

  • Severity when opened:
  • Priority when opened:
@mdebarros mdebarros added the bug Something isn't working or it has wrong behavior on a Mojaloop Core service label Aug 6, 2021
@elnyry-sam-k elnyry-sam-k added the oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it label Aug 6, 2021
@elnyry-sam-k elnyry-sam-k added this to the Sprint 15.2 milestone Aug 16, 2021
@mdebarros mdebarros self-assigned this Aug 16, 2021
@mdebarros
Copy link
Member Author

PR to fix this --> mojaloop/simulator#230

mdebarros added a commit to mojaloop/simulator that referenced this issue Aug 16, 2021
…lts when SubId request param is provided (#230)

fix([mojaloop/#2373](mojaloop/project#2373)): Mojaloop Oracle Simulator is not correctly filtering results when SubId request param is provided:
- Fixed getParticipantsByTypeId not correctly filtering out query param SubId
- Updated dependencies
- Bump to patch version
- Fixes for audit-resolve

```text
--------------------------------------------------
 yargs-parser needs your attention.

[ low ] Prototype Pollution
 vulnerable versions <13.1.2 || >=14.0.0 <15.0.1 || >=16.0.0 <18.1.2 found in:
 - dependencies: @mojaloop/central-services-shared>widdershins>yargs>yargs-parser
```
> Outcome: Fixed
> Impact: None

```text
--------------------------------------------------
 sanitize-html needs your attention.

[ moderate ] Improper Input Validation
 vulnerable versions <2.3.1 found in:
 - dependencies: @mojaloop/central-services-shared>shins>sanitize-html
[ moderate ] Improper Input Validation
 vulnerable versions <2.3.2 found in:
 - dependencies: @mojaloop/central-services-shared>shins>sanitize-html
```
> Outcome: Ignored for a week
> Impact: Minimal as the dependencies are used for the Developer Documentation end-point
@mdebarros
Copy link
Member Author

mdebarros commented Aug 17, 2021

PR to fix this --> mojaloop/simulator#230

PR for Helm v13.0.2.

Test Suite:GP Tests
Environment:moja2.test.mojaloop.live
┌───────────────────────────────────────────────────┐
│                      SUMMARY                      │
├───────────────────┬───────────────────────────────┤
│ Total assertions  │ 2064                          │
├───────────────────┼───────────────────────────────┤
│ Passed assertions │ 2064                          │
├───────────────────┼───────────────────────────────┤
│ Failed assertions │ 0                             │
├───────────────────┼───────────────────────────────┤
│ Total requests    │ 446                           │
├───────────────────┼───────────────────────────────┤
│ Total test cases  │ 99                            │
├───────────────────┼───────────────────────────────┤
│ Passed percentage │ 100.00%                       │
├───────────────────┼───────────────────────────────┤
│ Started time      │ Tue, 17 Aug 2021 08:46:09 GMT │
├───────────────────┼───────────────────────────────┤
│ Completed time    │ Tue, 17 Aug 2021 08:48:32 GMT │
├───────────────────┼───────────────────────────────┤
│ Runtime duration  │ 142526 ms                     │
└───────────────────┴───────────────────────────────┘

View Report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Projects
None yet
Development

No branches or pull requests

2 participants