Skip to content

Commit

Permalink
Remove redirectin based on user-defined input (#3124)
Browse files Browse the repository at this point in the history
  • Loading branch information
DL6ER authored Sep 2, 2024
2 parents 84f10b3 + 7b8829b commit 085c288
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions scripts/pi-hole/js/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@

/* global utils:false, NProgress:false */

function getParams() {
var GETDict = {};
window.location.search
.substr(1)
.split("&")
.forEach(function (item) {
GETDict[item.split("=")[0]] = decodeURIComponent(item.split("=")[1]);
});
return GETDict;
}

function redirect() {
// Login succeeded or not needed (empty password)
// Default: Send back to dashboard
Expand All @@ -26,13 +15,6 @@ function redirect() {
// If DNS failure: send to Pi-hole diagnosis messages page
if ($("#dns-failure-label").is(":visible")) {
target = "messages.lp";
} else {
// If specified: Send to requested page
var GETDict = getParams();
if ("target" in GETDict) {
// URL-decode target
target = GETDict.target;
}
}

// Redirect to target
Expand Down

0 comments on commit 085c288

Please sign in to comment.