Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/bugsnag.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
*/

'proxy' => array_filter([
'http' => env('HTTP_PROXY'),
'https' => env('HTTPS_PROXY'),

Copy link
Copy Markdown
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
Copy Markdown
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.

'no' => explode(',', str_replace(' ', '', env('NO_PROXY', ''))) ?: null,
]),
Expand Down
4 changes: 4 additions & 0 deletions src/BugsnagServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') {

@GrahamCampbell GrahamCampbell Jul 18, 2016

Copy link
Copy Markdown
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.

unset($config['proxy']['http']);
}

$options['proxy'] = $config['proxy'];
}

Expand Down