Skip to content

Commit

Permalink
Merge pull request #5410 from Countly/SER-1673-apn-universal-certific…
Browse files Browse the repository at this point in the history
…ate-parsing

[SER-1673] p12 files being parsed incorrectly when there are multiple occurrences of an extension
  • Loading branch information
coskunaydinoglu committed Jul 16, 2024
2 parents dd636bf + 16d1b44 commit ebcaa80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/push/api/send/platforms/i.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ const CREDS = {
for (var i = 0; i < tpks.length; i++) {
for (var j = 0; j < tpks.length; j++) {
if (i !== j && tpks[j].indexOf(tpks[i]) === 0) {
if (topics.indexOf(tpks[i]) === -1 && tpks[i] && tpks[i].indexOf('.') !== -1) {
if (topics.indexOf(tpks[i]) === -1 && tpks[i] && tpks[i].indexOf('.') !== -1 && tpks[i].indexOf(".") !== 0) {
topics.push(tpks[i]);
}
if (topics.indexOf(tpks[j]) === -1 && tpks[j] && tpks[j].indexOf('.') !== -1) {
if (topics.indexOf(tpks[j]) === -1 && tpks[j] && tpks[j].indexOf('.') !== -1 && tpks[j].indexOf(".") !== 0) {
topics.push(tpks[j]);
}
}
Expand Down

0 comments on commit ebcaa80

Please sign in to comment.