From 0d40ee7ae6cc64bc10ff64f8ebcc5a58f90a0a47 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 20 May 2020 21:45:27 -0700 Subject: [PATCH] Don't allow file-dev in proxy mode --- js/modules/loki_app_dot_net_api.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/modules/loki_app_dot_net_api.js b/js/modules/loki_app_dot_net_api.js index 457ded652..e7f740d4e 100644 --- a/js/modules/loki_app_dot_net_api.js +++ b/js/modules/loki_app_dot_net_api.js @@ -588,6 +588,14 @@ class LokiAppDotNetServerAPI { } // else will fail validation later + // if in proxy mode, don't allow "file-dev."... + // it only supports "file."... host. + if (window.lokiFeatureFlags.useSnodeProxy) { + pubKeyAB = window.Signal.Crypto.base64ToArrayBuffer( + LOKIFOUNDATION_FILESERVER_PUBKEY + ); + } + // do we have their pubkey locally? // FIXME: this._server won't be set yet... // can't really do this for the file server because we'll need the key