fix: audit
This commit is contained in:
parent
9f8aad114c
commit
b91b81f5c9
21 changed files with 140 additions and 53 deletions
|
@ -337,13 +337,15 @@ export const actions = {
|
|||
async getCustomRelayerData({ rootState, state, getters, rootGetters, dispatch }, { url, name }) {
|
||||
const provider = getters.ethProvider.eth
|
||||
|
||||
if (!url.startsWith('https:') && !url.startsWith('http:')) {
|
||||
if (url.includes('.onion')) {
|
||||
const PROTOCOL_REGEXP = /^(http(s?))/
|
||||
if (!PROTOCOL_REGEXP.test(url)) {
|
||||
if (url.endsWith('.onion')) {
|
||||
url = `http://${url}`
|
||||
} else {
|
||||
url = `https://${url}`
|
||||
}
|
||||
}
|
||||
|
||||
const urlParser = new URL(url)
|
||||
urlParser.href = url
|
||||
let ensName = name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue