Skip to content

different results from CLI and browser #4

Description

@digitall-it

I'm getting different results from CLI and browser for a command, I don't know why. It is a security feature of psysh or sliver? [edited] means a string was there that for security reasons has been edited out.

From CLI I run

$Mautic = new Mautic();
=> Mautic {#197
     +class: null,
     +"_contextapi": [],
   }
$Mautic->getSettings();
=> [
     "baseUrl" => "[edited]",
     "version" => "BasicAuth",
     "clientKey" => "[edited]",
     "clientSecret" => "[edited]",
     "callback" => false,
     "access_token" => "[edited]",
     "expires" => "[edited]",
     "token_type" => "[edited]",
     "refresh_token" => "[edited]",
     "userName" => null,
     "password" => null,
   ]

From browser the same code

$Mautic = new Mautic();
$s=$Mautic->getSettings();
var_dump($s);
die();

returns

array(11) {
  ["baseUrl"]=>
  string(29) "[edited]"
  ["version"]=>
  string(9) "[edited]"
  ["clientKey"]=>
  string(52) "[edited]"
  ["clientSecret"]=>
  string(50) "[edited]"
  ["callback"]=>
  string(41) "[edited]"
  ["access_token"]=>
  string(86) "[edited]"
  ["expires"]=>
  string(10) "[edited]"
  ["token_type"]=>
  string(6) "[edited]"
  ["refresh_token"]=>
  string(86) "[edited]"
  ["userName"]=>
  string(9) "[edited]"
  ["password"]=>
  string(10) "[edited]"
}

note that callback, userName and password bear different values. I went crazy tried to find the bug in the code, found out that it was a bug in the CLI. The settings you see are simply values recorded in the SilverStripe 3.6.5 SiteConfig. I wonder if there's a problem with the sliver bootstrap.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions