From 770b5558d4272f2ddec31d47093149a58910c479 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Tue, 1 Jun 2021 18:16:45 +0200
Subject: [PATCH] Do not redirect to empty URLs on progress page

---
 CHANGELOG.rst                      | 1 +
 aleksis/core/static/js/progress.js | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c4d2d9d6b..bc269b133 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -20,6 +20,7 @@ Fixed
 ~~~~~
 
 * Fix installation documentation (nginx, uWSGI).
+* Progress page tried to redirect even if the URL is empty.
 
 Removed
 ~~~~~~~
diff --git a/aleksis/core/static/js/progress.js b/aleksis/core/static/js/progress.js
index c9b1be903..9be718b7e 100644
--- a/aleksis/core/static/js/progress.js
+++ b/aleksis/core/static/js/progress.js
@@ -47,7 +47,7 @@ function customSuccess(progressBarElement, progressBarMessageElement) {
     $("#result-icon").text("check_circle");
     $("#result-text").text(OPTIONS.success);
     $("#result-box").show();
-    const redirect = "redirect_on_success" in OPTIONS;
+    const redirect = "redirect_on_success" in OPTIONS && OPTIONS.redirect_on_success;
     if (redirect) {
         window.location.replace(OPTIONS.redirect_on_success);
     }
-- 
GitLab