Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-10835

scripts validation endpoint returns valid even for invalid scripts

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Expired
    • Affects Version/s: 14.0.0-M30
    • Fix Version/s: None
    • Component/s: API descriptor
    • Labels:

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Filip.Kuban Filip Kubáň [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: