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"] || {}
|
||||
).value || [""])[0];
|
||||
}
|
||||
|
||||
const remoteAddress = new URL(connectionRequestUrl).hostname;
|
||||
let remoteAddress;
|
||||
try {
|
||||
remoteAddress = new URL(connectionRequestUrl).hostname;
|
||||
} catch (err) {
|
||||
return "Invalid connection request URL";
|
||||
}
|
||||
|
||||
const evalCallback = (exp): Expression => {
|
||||
if (!Array.isArray(exp)) return exp;
|
||||
|
||||
Reference in new issue
Block a user