Changed default: enable SSL certificate verification by default#27
Changed default: enable SSL certificate verification by default#27iskakaushik merged 1 commit intomainfrom
Conversation
Changed verify_ssl_cert default from false to true to protect against man-in-the-middle attacks. Users can still explicitly disable if needed for testing with self-signed certificates. Fixes #8
There was a problem hiding this comment.
Pull Request Overview
Enable SSL certificate verification by default to reduce exposure to man-in-the-middle attacks.
- Changed HttpConfig.verify_ssl_cert default from false to true.
- No accompanying inline documentation or migration notes added for this behavioral change.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| int connection_timeout_sec = 30; | ||
| int read_timeout_sec = 120; | ||
| bool verify_ssl_cert = false; | ||
| bool verify_ssl_cert = true; |
There was a problem hiding this comment.
Changing the default from false to true is a breaking behavioral change for consumers who relied on disabled verification (e.g., self-signed test environments). Consider adding a transitional strategy (e.g., version bump, release notes, or an explicit migration guide) or preserving backward compatibility via a factory/helper that applies legacy defaults when needed.
| @@ -19,7 +19,7 @@ struct HttpConfig { | |||
| bool use_ssl = true; | |||
| int connection_timeout_sec = 30; | |||
| int read_timeout_sec = 120; | |||
There was a problem hiding this comment.
This security-sensitive default merits an explanatory comment (e.g., rationale, how to override for self-signed certificates) above the field to prevent silent confusion. Suggest adding a brief doc comment: // When true, performs SSL certificate validation. Set to false only for controlled test environments with self-signed certs.
| int read_timeout_sec = 120; | |
| int read_timeout_sec = 120; | |
| // When true, performs SSL certificate validation. Set to false only for controlled test environments with self-signed certs. |
Changed verify_ssl_cert default from false to true to protect against man-in-the-middle attacks. Users can still explicitly disable if needed for testing with self-signed certificates.
Fixes #8