Skip to content

Commit

Permalink
Remove all unwanted characters from $versions
Browse files Browse the repository at this point in the history
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
  • Loading branch information
rdwebdesign committed Sep 21, 2022
1 parent d324215 commit 2d346a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/pi-hole/php/update_checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ function checkUpdate($currentVersion, $latestVersion)
} else {
$versions = parse_ini_file($versionsfile);

// Allow only valid characters
$versions = preg_replace('/[^[:alnum:]._:\/-]/i', '', $versions);

// Get Pi-hole core branch / version / commit
// Check if on a dev branch
$core_branch = $versions['CORE_BRANCH'];
Expand Down

0 comments on commit 2d346a1

Please sign in to comment.