Skip to content

Commit

Permalink
v5.14.2 (#2332)
Browse files Browse the repository at this point in the history
  • Loading branch information
PromoFaux authored Sep 4, 2022
2 parents 5370780 + d68d5ee commit 37dbfc8
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 45 deletions.
65 changes: 33 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"postcss": "^8.4.16",
"postcss-cli": "^10.0.0",
"prettier": "2.7.1",
"xo": "^0.52.2"
"xo": "^0.52.3"
},
"browserslist": [
"defaults",
Expand Down
6 changes: 3 additions & 3 deletions scripts/pi-hole/php/password.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$pwhash = '';
}

function verifyPassword($pwhash)
function verifyPassword($pwhash, $use_api = false)
{
$validpassword = true;

Expand Down Expand Up @@ -86,7 +86,7 @@ function verifyPassword($pwhash)
if (hash_equals($pwhash, $_SESSION['hash'])) {
$_SESSION['auth'] = true;
}
} elseif (isset($api) && isset($_GET['auth'])) {
} elseif ($use_api && isset($_GET['auth'])) {
// API can use the hash to get data without logging in via plain-text password
if (hash_equals($pwhash, $_GET['auth'])) {
$_SESSION['auth'] = true;
Expand All @@ -103,5 +103,5 @@ function verifyPassword($pwhash)
return $validpassword;
}

$wrongpassword = !verifyPassword($pwhash);
$wrongpassword = !verifyPassword($pwhash, isset($api));
$auth = $_SESSION['auth'];
19 changes: 10 additions & 9 deletions scripts/pi-hole/php/update_checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ function checkUpdate($currentVersion, $latestVersion)
$docker_update = false;
} else {
$docker_update = checkUpdate($docker_current, $docker_latest);

$dockerUrl = 'https://github.com/pi-hole/docker-pi-hole/releases';
$dockerVersionStr = '<a href="'.$dockerUrl.'/'.$docker_current.'" rel="noopener" target="_blank">'.$docker_current.'</a>';
}
} else {
// Components comparison
Expand All @@ -102,26 +99,30 @@ function checkUpdate($currentVersion, $latestVersion)
$coreUrl = 'https://github.com/pi-hole/pi-hole/releases';
$webUrl = 'https://github.com/pi-hole/AdminLTE/releases';
$ftlUrl = 'https://github.com/pi-hole/FTL/releases';
$dockerUrl = 'https://github.com/pi-hole/docker-pi-hole/releases';

// Version strings
// If "vDev" show branch/commit, else show link
$coreVersionStr = $core_current;
if (isset($core_commit)) {
$coreVersionStr .= ' ('.$core_branch.', '.$core_commit.')';
$coreVersionStr = $core_current.' ('.$core_branch.', '.$core_commit.')';
} else {
$coreVersionStr = '<a href="'.$coreUrl.'/'.$core_current.'" rel="noopener" target="_blank">'.$core_current.'</a>';
}

$webVersionStr = $web_current;
if (isset($web_commit)) {
$webVersionStr .= ' ('.$web_branch.', '.$web_commit.')';
$webVersionStr = $web_current.' ('.$web_branch.', '.$web_commit.')';
} else {
$webVersionStr = '<a href="'.$webUrl.'/'.$web_current.'" rel="noopener" target="_blank">'.$web_current.'</a>';
}

$ftlVersionStr = $FTL_current;
if (isset($FTL_commit)) {
$ftlVersionStr .= ' ('.$FTL_branch.', '.$FTL_commit.')';
$ftlVersionStr = $FTL_current.' ('.$FTL_branch.', '.$FTL_commit.')';
} else {
$ftlVersionStr = '<a href="'.$ftlUrl.'/'.$FTL_current.'" rel="noopener" target="_blank">'.$FTL_current.'</a>';
}

if ($docker_current) {
$dockerVersionStr = '<a href="'.$dockerUrl.'/'.$docker_current.'" rel="noopener" target="_blank">'.$docker_current.'</a>';
} else {
$dockerVersionStr = '';
}

0 comments on commit 37dbfc8

Please sign in to comment.