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

Duplicate access token in url #29

Open
ghost opened this issue Dec 29, 2016 · 3 comments
Open

Duplicate access token in url #29

ghost opened this issue Dec 29, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 29, 2016

While debugging a Guzzle request I noticed the access token appears twice in the url. It is set in line 39 and line 55:

'access_token' => $input->getOption('access-token'),

'repositories/'.$repositoryName.'/data/code-coverage{?access_token}',

One should probably be removed?

@andreasciamanna
Copy link

Same issue here.

I couldn't find the time to properly debug this, but in \Guzzle\Http\Client::createRequest at line #184, ($url = Url::factory($this->getBaseUrl())->combine($this->expandTemplate($uri, $templateVars));), the $url variable is set as such:

Guzzle\Http\Url::__set_state(array(
   'scheme' => 'https',
   'host' => 'scrutinizer-ci.com',
   'port' => NULL,
   'username' => NULL,
   'password' => NULL,
   'path' => 'XXXXXXXXXXXXX',
   'fragment' => NULL,
   'query' => 
  Guzzle\Http\QueryString::__set_state(array(
     'fieldSeparator' => '&',
     'valueSeparator' => '=',
     'urlEncode' => 'RFC 3986',
     'aggregator' => NULL,
     'data' => 
    array (
      'access_token' => 
      array (
        0 => '37CBD44EDADBAC15B1AAEE4CB517168BB8D43901CF3F8E30417E5E9C35AE12CA',
        1 => '37CBD44EDADBAC15B1AAEE4CB517168BB8D43901CF3F8E30417E5E9C35AE12CA',
      ),
    ),
  )),
))

@schmittjoh
Copy link
Member

schmittjoh commented Jan 25, 2017

The duplicate access token should generally not hurt, but it is indeed something that is unnecessary.

Did you receive another error which lead you to debugging this?

@andreasciamanna
Copy link

andreasciamanna commented Jan 25, 2017 via email

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

2 participants