From: Tim Düsterhus Date: Tue, 26 Feb 2019 15:04:02 +0000 (+0100) Subject: Fix redirect in Message/Reply#_insertMessage if the new URL is the current X-Git-Tag: 3.1.9~29 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60c9a71c35c883c84538842f86202e2ecb93d08a;p=GitHub%2FWoltLab%2FWCF.git Fix redirect in Message/Reply#_insertMessage if the new URL is the current This might happen if the AJAX request intentionally returns the URL to an existing content (e.g. to prevent duplicate content or when performing automated merges). --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js index e5ef0f4ced..8979bf2a2f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js @@ -321,6 +321,9 @@ define(['Ajax', 'Core', 'EventHandler', 'Language', 'Dom/ChangeListener', 'Dom/U //noinspection JSUnresolvedVariable if (data.returnValues.url) { //noinspection JSUnresolvedVariable + if (window.location == data.returnValues.url) { + window.location.reload(); + } window.location = data.returnValues.url; } else {