Skip to content

Commit

Permalink
Merge pull request node-saml#500 from node-saml/support-windows-line-…
Browse files Browse the repository at this point in the history
…breaks-in-key

support windows line breaks in keys
  • Loading branch information
gugu authored Nov 13, 2020
2 parents 711956c + d97d7e3 commit 41f7807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/passport-saml/saml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 41f7807

Please sign in to comment.