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

Allow data before the encapsulation boundaries as per RFC-7468 Sec. 2 #5

Merged
merged 1 commit into from
Apr 14, 2024
Merged
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
8 changes: 7 additions & 1 deletion src/secret-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ export class SecretDetails extends React.Component<Renderer.Component.KubeObject
"base64"
).toString("ascii");

if (!certificateString.startsWith("-----BEGIN CERTIFICATE-----"))
const PEM_CERTIFICATE_HEADER = "-----BEGIN CERTIFICATE-----";
const PEM_CERTIFICATE_FOOTER = "-----END CERTIFICATE-----";

if (!certificateString.includes(PEM_CERTIFICATE_HEADER) ||
!certificateString.includes(PEM_CERTIFICATE_FOOTER)) {
// The certificate string does not have the correct PEM format
continue;
}

try {
let secureContext = tls.createSecureContext({
Expand Down
Loading