[OPENAM-10835] scripts validation endpoint returns valid even for invalid scripts Created: 07/Mar/17  Updated: 04/Apr/18  Resolved: 04/Apr/18

Status: Closed
Project: OpenAM
Component/s: API descriptor
Affects Version/s: 14.0.0-M30
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Filip Kubáň [X] (Inactive) Assignee: Unassigned
Resolution: Expired Votes: 0
Labels: AME, Should-Fix
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
Target Version/s:
Rank: 1|hzt27j:

 Description   

When using action_validate, true is returned even when the script is not a valid script.

Steps to reproduce:
1) Login as amadmin
2) Navigate to API descriptor -> scripts (openam/XUI/#api/explorer/scripts)
3) Select "/scripts#1.1_action_validate"
4) Use valid payload like:

{
  "script": "dmFyIGkgPSAxOw==",
  "language": "JAVASCRIPT"
}

Note: script is base64 encoded source code in this case

var i = 1;

5) Click "Try it out!"
6) Observe successful validation
7) Next use invalid payload like (script contains word "text" which is not valid Javascript):

{
  "script": "dGVzdA==",
  "language": "JAVASCRIPT"
}

Expected result:
Validation fails

Actual result:
Validation is successful.



 Comments   
Comment by Phill Cunnington [ 04/Apr/18 ]

Closing issues affecting versions that have reached their EOSL. Please re-test against a supported version and re-open and update ticket if needed.

Generated at Sat Feb 27 22:07:51 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.