forked from Mirrors/doipjs
chore: release 1.1.1
This commit is contained in:
parent
beb78e8227
commit
ba6941448c
9 changed files with 54 additions and 9 deletions
|
@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.1.1] - 2023-09-22
|
||||
### Fixed
|
||||
- Normalize case before hashed proof verification
|
||||
|
||||
## [1.1.0] - 2023-09-21
|
||||
### Changed
|
||||
- Unify fromJSON() for Profile, Persona and Claim classes
|
||||
|
|
45
dist/doip.core.js
vendored
45
dist/doip.core.js
vendored
|
@ -2591,7 +2591,7 @@ var doip = (function (exports, openpgp$1, fetcher) {
|
|||
if (parseInt(match[0].split('$')[2]) > 12) continue
|
||||
|
||||
const hashPromise = bcryptVerify({
|
||||
password: fingerprintURI,
|
||||
password: fingerprintURI.toLowerCase(),
|
||||
hash: match[0]
|
||||
})
|
||||
.then(result => result)
|
||||
|
@ -2604,6 +2604,28 @@ var doip = (function (exports, openpgp$1, fetcher) {
|
|||
} catch (err) {
|
||||
result = false;
|
||||
}
|
||||
|
||||
// Accept mixed-case fingerprints until deadline
|
||||
if (!result) {
|
||||
try {
|
||||
// Patch until promise.race properly works on WASM
|
||||
if (parseInt(match[0].split('$')[2]) > 12) continue
|
||||
|
||||
const hashPromise = bcryptVerify({
|
||||
password: fingerprintURI,
|
||||
hash: match[0]
|
||||
})
|
||||
.then(result => result)
|
||||
.catch(_ => false);
|
||||
|
||||
result = await Promise.race([hashPromise, timeoutPromise]).then((result) => {
|
||||
clearTimeout(timeoutHandle);
|
||||
return result
|
||||
});
|
||||
} catch (err) {
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
break
|
||||
|
||||
case 'argon2':
|
||||
|
@ -2612,7 +2634,7 @@ var doip = (function (exports, openpgp$1, fetcher) {
|
|||
case 'argon2id':
|
||||
try {
|
||||
const hashPromise = argon2Verify({
|
||||
password: fingerprintURI,
|
||||
password: fingerprintURI.toLowerCase(),
|
||||
hash: match[0]
|
||||
})
|
||||
.then(result => result)
|
||||
|
@ -2625,6 +2647,25 @@ var doip = (function (exports, openpgp$1, fetcher) {
|
|||
} catch (err) {
|
||||
result = false;
|
||||
}
|
||||
|
||||
// Accept mixed-case fingerprints until deadline
|
||||
if (!result) {
|
||||
try {
|
||||
const hashPromise = argon2Verify({
|
||||
password: fingerprintURI,
|
||||
hash: match[0]
|
||||
})
|
||||
.then(result => result)
|
||||
.catch(_ => false);
|
||||
|
||||
result = await Promise.race([hashPromise, timeoutPromise]).then((result) => {
|
||||
clearTimeout(timeoutHandle);
|
||||
return result
|
||||
});
|
||||
} catch (err) {
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
2
dist/doip.core.min.js
vendored
2
dist/doip.core.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/doip.fetchers.js
vendored
2
dist/doip.fetchers.js
vendored
|
@ -2728,7 +2728,7 @@ var doipFetchers = (function (exports) {
|
|||
* doip.js library version
|
||||
* @constant {string}
|
||||
*/
|
||||
const version = '1.1.0';
|
||||
const version = '1.1.1';
|
||||
|
||||
/*
|
||||
Copyright 2022 Yarmo Mackenbach
|
||||
|
|
2
dist/doip.fetchers.min.js
vendored
2
dist/doip.fetchers.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/doip.fetchers.minimal.js
vendored
2
dist/doip.fetchers.minimal.js
vendored
|
@ -2698,7 +2698,7 @@ var doipFetchers = (function (exports) {
|
|||
* doip.js library version
|
||||
* @constant {string}
|
||||
*/
|
||||
const version = '1.1.0';
|
||||
const version = '1.1.1';
|
||||
|
||||
/*
|
||||
Copyright 2022 Yarmo Mackenbach
|
||||
|
|
2
dist/doip.fetchers.minimal.min.js
vendored
2
dist/doip.fetchers.minimal.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "doipjs",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"description": "Decentralized Online Identity Proofs library in Node.js",
|
||||
"type": "module",
|
||||
"main": "./src/index.js",
|
||||
|
|
|
@ -22,4 +22,4 @@ limitations under the License.
|
|||
* doip.js library version
|
||||
* @constant {string}
|
||||
*/
|
||||
export const version = '1.1.0'
|
||||
export const version = '1.1.1'
|
||||
|
|
Loading…
Reference in a new issue