Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1232

Calling AppModel methods with default params via API results in error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Attempting to invoke AppModel::systemEncrypt() via the Encryption model results in a Failed to retrieve the default value error. This is a result of the following lines in /app/controllers/api.php:

      $method_params[$param->name] = $param->getDefaultValue();
      

      It appears that ionCube may be causing the ReflectionParameter::getDefaultValue() method from detecting the default value.

      curl https://yourdomain.com/installpath/api/encryption/systemEncrypt.json -u username:key -d 'value=my text'
      

      Important to note that this issue does not happen if you specify all parameters to a method, call a method that has no default parameters, or call a method that lives outside of any ioncube encoded file.

        Issue Links

          Activity

          Hide
          cody Cody Phillips (Inactive) added a comment -

          This is caused by ioncube. Outside of our control.

          Show
          cody Cody Phillips (Inactive) added a comment - This is caused by ioncube. Outside of our control.

            People

            • Assignee:
              cody Cody Phillips (Inactive)
              Reporter:
              cody Cody Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: