From d97d7e316f8c086309201dc594053b99fb6de40b Mon Sep 17 00:00:00 2001 From: "andrii@short.io" Date: Fri, 13 Nov 2020 16:08:51 +0000 Subject: [PATCH] support windows line breaks in keys --- src/passport-saml/saml.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/passport-saml/saml.ts b/src/passport-saml/saml.ts index 2c6c075f..923fcdd6 100644 --- a/src/passport-saml/saml.ts +++ b/src/passport-saml/saml.ts @@ -1422,7 +1422,7 @@ class SAML { keyToPEM(key: crypto.KeyLike) { if (!key || typeof key !== 'string') return key; - const lines = key.split('\n'); + const lines = key.split(/\r?\n/); if (lines.length !== 1) return key; const wrappedKey = [