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

different results from CLI and browser #4

Open
digitall-it opened this issue Jul 30, 2018 · 0 comments
Open

different results from CLI and browser #4

digitall-it opened this issue Jul 30, 2018 · 0 comments

Comments

@digitall-it
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant