From 6e7930f7a983ff9a61ada1bd8feb32c57132c7b1 Mon Sep 17 00:00:00 2001 From: iomintz Date: Mon, 12 Oct 2020 17:08:43 -0500 Subject: [PATCH] WebAPI.initialize: add missing validity check for proxyUrl (#4565) --- ts/textsecure/WebAPI.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ts/textsecure/WebAPI.ts b/ts/textsecure/WebAPI.ts index c377c33da5aa..f7202a1cb03c 100644 --- a/ts/textsecure/WebAPI.ts +++ b/ts/textsecure/WebAPI.ts @@ -895,6 +895,9 @@ export function initialize({ if (!is.string(contentProxyUrl)) { throw new Error('WebAPI.initialize: Invalid contentProxyUrl'); } + if (proxyUrl && !is.string(proxyUrl)) { + throw new Error('WebAPI.initialize: Invalid proxyUrl'); + } if (!is.string(version)) { throw new Error('WebAPI.initialize: Invalid version'); }