From 5eef99829295fdca82dbe31f2d94b98764a6ae42 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 18 Jun 2014 14:18:47 +0200 Subject: [PATCH] fix binary type detection We need to use wss:// instead of ws:// to avoid security errors. --- debian/control | 2 +- .../patches/fix-websocket-binary-support-test.patch | 13 +++++++++++++ debian/patches/series | 1 + debian/rules | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 debian/patches/fix-websocket-binary-support-test.patch create mode 100644 debian/patches/series diff --git a/debian/control b/debian/control index dcdc225..1a895c8 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: novnc-pve Section: web Priority: optional Maintainer: Proxmox Support Team -Build-Depends: debhelper (>= 7.0.0~) +Build-Depends: debhelper (>= 7.0.0~), quilt Standards-Version: 3.8.3 Homepage: https://github.com/kanaka/noVNC/ diff --git a/debian/patches/fix-websocket-binary-support-test.patch b/debian/patches/fix-websocket-binary-support-test.patch new file mode 100644 index 0000000..c36c8b7 --- /dev/null +++ b/debian/patches/fix-websocket-binary-support-test.patch @@ -0,0 +1,13 @@ +Index: new/include/websock.js +=================================================================== +--- new.orig/include/websock.js 2014-06-13 07:20:22.000000000 +0200 ++++ new/include/websock.js 2014-06-18 14:12:20.000000000 +0200 +@@ -282,7 +282,7 @@ + // TODO: this sucks, the property should exist on the prototype + // but it does not. + try { +- if (bt && ('binaryType' in (new WebSocket("ws://localhost:17523")))) { ++ if (bt && ('binaryType' in (new WebSocket("wss://localhost:17523")))) { + Util.Info("Detected binaryType support in WebSockets"); + wsbt = true; + } diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..af4d599 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +fix-websocket-binary-support-test.patch diff --git a/debian/rules b/debian/rules index 915f1dc..4929ed9 100755 --- a/debian/rules +++ b/debian/rules @@ -13,4 +13,4 @@ build: make -C utils rebind.so %: - dh ${@} + dh ${@} --with quilt -- 2.39.2