Skip to content

Commit

Permalink
🐛 Fix MatthieuLemoine#34, escape endpoint form data param
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick-Remy committed Jul 23, 2021
1 parent ba034f6 commit b5aefc3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/fcm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@ async function registerFCM({ senderId, token }) {
},
form : {
authorized_entity : senderId,
endpoint : `${FCM_ENDPOINT}/${token}`,
encryption_key : keys.publicKey
.replace(/=/g, '')
.replace(/\+/g, '-')
.replace(/\//g, '_'),
encryption_auth : keys.authSecret
.replace(/=/g, '')
.replace(/\+/g, '-')
.replace(/\//g, '_'),
endpoint : escape(`${FCM_ENDPOINT}/${token}`),
encryption_key : keys.publicKey,
encryption_auth : keys.authSecret,
},
});
return {
Expand Down

0 comments on commit b5aefc3

Please sign in to comment.