getToken();
$_SESSION['token'] = $token;
}
$_SESSION['admin-uuid'] = $cryptography->uniqueID();
if(!isset($_SESSION['admin-uuid']) || empty($_SESSION['admin-uuid'])) {
echo 'Could not initialize a session. Possible reasons: session data might be full or not possible to create a session. For security reasons the administration panel cannot be loaded. Exiting.';
exit;
}
// create a new admin token
if(!isset($_SESSION['uuid'])) {
$token = $cryptography->uniqueID();
$token .= $cryptography->uniqueID();
$token .= $cryptography->uniqueID();
$token .= $cryptography->uniqueID();
$_SESSION['uuid'] = $token;
} else {
$token = $_SESSION['uuid'];
}
// configuration files are stored in the /server/ folder.
$serverconfig_csv = [
'currencies.conf.csv',
'messages.conf.csv',
'orders.conf.csv',
'shipping.conf.csv',
'shop.conf.csv',
'site.conf.csv',
'tax.conf.csv',
'payment.conf.csv'];
$serverconfig_json = [
'currencies.conf.json',
'messages.conf.json',
'orders.conf.json',
'shipping.conf.json',
'shop.conf.json',
'site.conf.json',
'tax.conf.json',
'payment.conf.json'];
?>
Welcome to the administration panel.
This part of the page should be placed behind a password protected area. No warranty given, use at your own discretion.
Directory did not exist, OpenShop created the new directory. (Be mindful that OpenShop does not allow special characters in directory names, including spaces). The new directory is named: ".$sanitizer->sanitize($destination,'encode')."
".PHP_EOL;
$createdir = true;
}
}
}
$disallowed = ['./','\\','../',':',';'];
$countimages = count($_FILES['files']['name']);
if($countimages >=1) {
for($g=0;$g<$countimages;$g++) {
for($f=0;$fImage name contains illegal characters, directory traversal is not allowed.".PHP_EOL;
exit;
}
}
if($_FILES['files']['error'][0] != 1) {
if($createdir) {
move_uploaded_file($_FILES['files']['tmp_name'][$g], strtolower($destination).'/'.$sanitizer->sanitize($_FILES['files']['name'][$g],'image')) or die('error: could not upload image.');
echo "