From 133c9bc257e11e2f5c4ff524fa587853f65561f2 Mon Sep 17 00:00:00 2001 From: JhontSouth Date: Thu, 7 Dec 2023 12:00:38 -0500 Subject: [PATCH] include validation to avoid undefined.trim() --- .../src/auth/certificateServiceClientCredentialsFactory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/botframework-connector/src/auth/certificateServiceClientCredentialsFactory.ts b/libraries/botframework-connector/src/auth/certificateServiceClientCredentialsFactory.ts index 461ab4e3b5..407cb62b63 100644 --- a/libraries/botframework-connector/src/auth/certificateServiceClientCredentialsFactory.ts +++ b/libraries/botframework-connector/src/auth/certificateServiceClientCredentialsFactory.ts @@ -75,7 +75,7 @@ export class CertificateServiceClientCredentialsFactory extends ServiceClientCre this.x5c = certificateThumbprintOrx5c; } else { ok( - certificateThumbprintOrx5c.trim(), + certificateThumbprintOrx5c?.trim(), 'CertificateServiceClientCredentialsFactory.constructor(): missing certificateThumbprint or x5c value.' ); this.certificateThumbprint = certificateThumbprintOrx5c;