diff --git a/copyparty/__main__.py b/copyparty/__main__.py index 2de35ead..1ddbdaae 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -1575,8 +1575,7 @@ def add_opds(ap): def add_wopi(ap): ap2 = ap.add_argument_group("WOPI options") ap2.add_argument("--wopi", action="store_true", help="allows for integrating with office suites using WOPI (volflag=wopi)") - ap2.add_argument("--wopi-client", type=u, default="https://localhost:9980", help="where to find your WOPI client, this is what actually hosts e.g. Collabora Online") - ap2.add_argument("--wopi-self-signed", action="store_true", help="disable certificate verification of the WOPI client, only use with local use") + ap2.add_argument("--wopi-client", type=u, default="https://demo.eu.collaboraonline.com", help="where to find your WOPI client, this is what actually hosts e.g. Collabora Online") def add_handlers(ap): diff --git a/copyparty/cfg.py b/copyparty/cfg.py index 0c5f6c4f..39b51ccb 100644 --- a/copyparty/cfg.py +++ b/copyparty/cfg.py @@ -397,7 +397,6 @@ flagcats = { "wopi": { "wopi": "enable WOPI support for integrating with online office suites", "wopi-client": "address of WOPI client, e.g. Collabora Online", - "wopi-self-signed": "disable certificate verification of the WOPI client, only use with local use" }, "opds": { "opds": "enable OPDS", diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 750f5890..461ae50a 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -18,7 +18,6 @@ import time import uuid import urllib.request import urllib.parse -import ssl import xml.etree.ElementTree as ET from datetime import datetime from operator import itemgetter @@ -1606,10 +1605,7 @@ class HttpCli(object): } try: - ctx = ssl.create_default_context() - ctx.check_hostname = False if self.args.wopi_self_signed else True - ctx.verify_mode = ssl.CERT_NONE if self.args.wopi_self_signed else ssl.CERT_REQUIRED - discovery = urllib.request.urlopen(self.args.wopi_client + "/hosting/discovery", context=ctx) + discovery = urllib.request.urlopen(self.args.wopi_client + "/hosting/discovery") response = ET.fromstring(discovery.read()) ext = path.split('.')[-1] wopi_url = response.find(".//action[@ext='%s'][@urlsrc]" % ext).get("urlsrc")