mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 14:39:28 -07:00
When performing plaintext proof comparison, remove spaces before
searching for fingerprint Fixes #22
This commit is contained in:
parent
542bab3232
commit
0e543946db
1 changed files with 7 additions and 1 deletions
|
@ -55,8 +55,14 @@ const containsProof = async (data, params) => {
|
|||
data = entities.decodeHTML(data)
|
||||
|
||||
// Check for plaintext proof
|
||||
result = data.replace(/\r?\n|\r/g, '')
|
||||
result = data
|
||||
// remove newlines and carriage returns
|
||||
.replace(/\r?\n|\r/g, '')
|
||||
// remove spaces
|
||||
.replace(/\s/g, '')
|
||||
// normalize
|
||||
.toLowerCase()
|
||||
// search for fingerprint
|
||||
.indexOf(fingerprintFormatted.toLowerCase()) !== -1
|
||||
|
||||
// Check for hashed proof
|
||||
|
|
Loading…
Reference in a new issue