Fix exception caused by invalid con req URL
This commit is contained in:
1 parent
227a005400
commit
6962cedba9
1 file changed
+6
-2
@@ -100,8 +100,12 @@ export async function connectionRequest(
|
|||||||
device["Device.ManagementServer.ConnectionRequestPassword"] || {}
|
device["Device.ManagementServer.ConnectionRequestPassword"] || {}
|
||||||
).value || [""])[0];
|
).value || [""])[0];
|
||||||
}
|
}
|
||||||
|
let remoteAddress;
|
||||||
const remoteAddress = new URL(connectionRequestUrl).hostname;
|
try {
|
||||||
|
remoteAddress = new URL(connectionRequestUrl).hostname;
|
||||||
|
} catch (err) {
|
||||||
|
return "Invalid connection request URL";
|
||||||
|
}
|
||||||
|
|
||||||
const evalCallback = (exp): Expression => {
|
const evalCallback = (exp): Expression => {
|
||||||
if (!Array.isArray(exp)) return exp;
|
if (!Array.isArray(exp)) return exp;
|
||||||
|
|||||||
Reference in new issue
Block a user