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

Improve key detection in site health tests #105

Merged
merged 3 commits into from Nov 3, 2023

Conversation

ashfame
Copy link
Member

@ashfame ashfame commented Oct 26, 2023

As a follow up from #104, Keys can have diff variations of PEM headers:

  • -----BEGIN PRIVATE KEY-----
  • -----BEGIN RSA PRIVATE KEY-----
  • -----BEGIN ENCRYPTED PRIVATE KEY-----

So, this PR changes the key detection to account for detecting -----BEGIN + * + PRIVATE|PUBLIC KEY----- in the beginning and -----END + * + PRIVATE|PUBLIC KEY----- in the end. Plus fixes the readme link.

psrpinto
psrpinto previously approved these changes Nov 2, 2023
Copy link
Member

@psrpinto psrpinto left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

src/SiteStatusTests.php Outdated Show resolved Hide resolved
@ashfame ashfame requested a review from psrpinto November 3, 2023 07:25
@ashfame ashfame merged commit 1afb496 into main Nov 3, 2023
1 check passed
@ashfame ashfame deleted the improve_key_detection_site_health_tests branch November 3, 2023 07:26
This was referenced Dec 8, 2023
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