From 6c3c1a2f1d44d9746cd9dcbe35e733a89e4e5acd Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Wed, 3 May 2023 16:21:19 +0200 Subject: [PATCH] URSH: Fix error when normalizing URL --- ursh/indico_ursh/controllers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ursh/indico_ursh/controllers.py b/ursh/indico_ursh/controllers.py index 1e2b6d0..4d957dd 100644 --- a/ursh/indico_ursh/controllers.py +++ b/ursh/indico_ursh/controllers.py @@ -6,7 +6,7 @@ # see the LICENSE file for more details. import posixpath -from urllib.parse import urlsplit +from urllib.parse import urlsplit, urlunsplit from flask import jsonify, request, session from flask_pluginengine import render_plugin_template @@ -74,7 +74,7 @@ class RHCustomShortURLPage(RHManageEventBase): from indico_ursh.plugin import UrshPlugin super()._process_args() api_host = urlsplit(UrshPlugin.settings.get('api_host')) - self.ursh_host = strip_end(api_host.to_url(), api_host.path[1:]).rstrip('/') + '/' + self.ursh_host = strip_end(urlunsplit(api_host), api_host.path[1:]).rstrip('/') + '/' def _process_GET(self): original_url = self._make_absolute_url(request.args['original_url'])