Skip to content

Commit

Permalink
Fix software updater bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitkerem committed Dec 26, 2020
1 parent 97ba4a2 commit 62aab3e
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions SoftwareUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@

// Include Updater Configuration
require_once "Configuration/UpdaterConfiguration.php";
session_name("SecureFormSession");
session_start();

// Check if Session is already open otherwise create a new one.
if(session_status() == PHP_SESSION_NONE) {
session_name("SecureFormsSession");
session_start();
} else {
// Make sure we are logged in and update s authorised.
if (!$_SESSION["loggedin"] and isset($_SESSION["UPDATE_AUTHORIZED"]) and $_SESSION["UPDATE_AUTHORIZED"] == "TRUE") {
// Redirect to / if not.
header("Location: /");
}
// Make sure we are logged in and update s authorised.
if (!$_SESSION["UPDATE_AUTHORIZED"] == "TRUE") {
// Stop execution with an error message
die("Skyfallen SecureForms stopped execution. Update not authorized.");
}
/**
* Deletes a folder recursively excluding Configuration and RSA Key Directories
Expand Down

0 comments on commit 62aab3e

Please sign in to comment.