mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
if nodebb returns 403/404, don't overwrite previousUrl. If you don't do this, when logging in after a 403/404, it will redirect you to the 403/404 page.
This commit is contained in:
@@ -117,7 +117,8 @@ var ajaxify = {};
|
|||||||
if (hrefEmpty(this.href) || this.target !== '' || this.protocol === 'javascript:')
|
if (hrefEmpty(this.href) || this.target !== '' || this.protocol === 'javascript:')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
app.previousUrl = window.location.href;
|
if(window.location.pathname != '/403' && window.location.pathname != '/404')
|
||||||
|
app.previousUrl = window.location.href;
|
||||||
|
|
||||||
if (!e.ctrlKey && e.which === 1) {
|
if (!e.ctrlKey && e.which === 1) {
|
||||||
if (this.host === window.location.host) {
|
if (this.host === window.location.host) {
|
||||||
@@ -192,4 +193,4 @@ var ajaxify = {};
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
Reference in New Issue
Block a user