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

Don't allow insecure proxy setting #143

Merged
merged 3 commits into from Jul 18, 2016
Merged

Don't allow insecure proxy setting #143

merged 3 commits into from Jul 18, 2016

Conversation

GrahamCampbell
Copy link
Contributor

Patches CVE-2016-5385.

@@ -99,7 +99,6 @@
*/

'proxy' => array_filter([
'http' => env('HTTP_PROXY'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the option from the default config file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored in #145 since it's still safe for cli, so no real reason to remove it.

@@ -70,6 +70,10 @@ public function register()
$options = ['base_uri' => isset($config['endpoint']) ? $config['endpoint'] : Client::ENDPOINT];

if (isset($config['proxy']) && $config['proxy']) {
if (isset($config['proxy']['http']) && php_sapi_name() != 'cli') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't allow the option through if we're on a vulnerable system because it's likely it was set by an env variable, particularly if from an old config file.

@kattrali kattrali merged commit 59cf2da into master Jul 18, 2016
@kattrali kattrali deleted the security branch July 18, 2016 18:16
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

Successfully merging this pull request may close these issues.

None yet

2 participants