mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 14:39:28 -07:00
Fix handling HKP URI
This commit is contained in:
parent
607f0434b9
commit
e599b32dba
1 changed files with 2 additions and 2 deletions
|
@ -115,7 +115,7 @@ const fetchURI = (uri) => {
|
|||
reject('Invalid URI')
|
||||
}
|
||||
|
||||
const re = /([a-zA-Z0-9]*):([a-zA-Z0-9@._=+\-]*)(\:[a-zA-Z0-9@._=+\-]*)?/
|
||||
const re = /([a-zA-Z0-9]*):([a-zA-Z0-9@._=+\-]*)(?:\:([a-zA-Z0-9@._=+\-]*))?/
|
||||
const match = uri.match(re)
|
||||
|
||||
if (!match[1]) {
|
||||
|
@ -124,7 +124,7 @@ const fetchURI = (uri) => {
|
|||
|
||||
switch (match[1]) {
|
||||
case 'hkp':
|
||||
resolve(fetchHKP(match[2], match.length >= 4 ? match[3] : null))
|
||||
resolve(fetchHKP(match[3] ? match[3] : match[2], match[3] ? match[2] : null))
|
||||
break
|
||||
case 'wkd':
|
||||
resolve(fetchWKD(match[2]))
|
||||
|
|
Loading…
Reference in a new issue