forked from Mirrors/doipjs
Fix bug causing false positive verification
This commit is contained in:
parent
71f31bfb9e
commit
1db8683886
1 changed files with 4 additions and 1 deletions
|
@ -114,7 +114,10 @@ const runVerification = (proofData, spData) => {
|
|||
break
|
||||
case 'text':
|
||||
re = new RegExp(
|
||||
utils.generateClaim(spData.claim.fingerprint, spData.claim.format),
|
||||
utils
|
||||
.generateClaim(spData.claim.fingerprint, spData.claim.format)
|
||||
.replace('[', '\\[')
|
||||
.replace(']', '\\]'),
|
||||
'gi'
|
||||
)
|
||||
res.isVerified = re.test(proofData.replace(/\r?\n|\r/, ''))
|
||||
|
|
Loading…
Reference in a new issue