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

accept inavlid ssl cert for development #15634

Closed
wants to merge 1 commit into from
Closed

accept inavlid ssl cert for development #15634

wants to merge 1 commit into from

Conversation

mikkeschiren
Copy link
Contributor

A suggestion to except invalid ssl cert in curl request for development, I think it could help out people for some functionality.

@sgiehl
Copy link
Member

sgiehl commented Feb 28, 2020

Guess would make sense to add a default value to global.ini.php with a comment what it's good for.
See

[Development]
; Enables the development mode where we avoid most caching to make sure code changes will be directly applied as
; some caches are only invalidated after an update otherwise. When enabled it'll also performs some validation checks.
; For instance if you register a method in a widget we will verify whether the method actually exists and is public.
; If not, we will show you a helpful warning to make it easy to find simple typos etc.
enabled = 0
; if set to 1, javascript files will be included individually and neither merged nor minified.
; this option must be set to 1 when adding, removing or modifying javascript files
; Note that for quick debugging, instead of using below setting, you can add `&disable_merged_assets=1` to the Matomo URL
disable_merged_assets = 0

@Findus23
Copy link
Member

Honestly I think this option should either only work when development mode is enabled or show a permanent, non-dismissable warning in Matomo (or at least the system check).
Otherwise it would be far to easy to accidently undermine a huge part of the security.

@mikkeschiren
Copy link
Contributor Author

Yeah agree - this should only work if Development module is active, and show a warning at system check - my goal with this first version on the pull request is to get the feedback. There are some problems with some development tools for some setups if you can not bypass invalid certs (local development mostly), but like said - it could be a security risk.

@sgiehl sgiehl added the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label Mar 4, 2020
@@ -96,8 +96,13 @@ public static function sendHttpRequest($aUrl,
// create output file
$file = self::ensureDestinationDirectoryExists($destinationPath);

$acceptInvalidSslCertificate = false;
if (isset(Config::getInstance()->Development['accept_invalid_ssl'])) {
Copy link
Member

Choose a reason for hiding this comment

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

@mikkeschiren could you add a default value to the config/global.ini.php for accept_invalid_ssl? And also add Development::isEnabled() to the check?

Copy link
Member

Choose a reason for hiding this comment

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

@mikkeschiren any chance you could check out my comment above and add the default value?

@tsteur
Copy link
Member

tsteur commented Sep 30, 2020

@mikkeschiren I'll close this PR for now as we haven't heard from you in a while but will be happy to reopen should you be keen to follow up on the other comments. Simply let us know and we'd be happy to review things again.

@tsteur tsteur closed this Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants