Skip to content

Commit

Permalink
support windows line breaks in keys
Browse files Browse the repository at this point in the history
  • Loading branch information
gugu committed Nov 13, 2020
1 parent 711956c commit d97d7e3
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 d97d7e3

Please sign in to comment.