X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/8d680388c6ee5495386a31ea22d794df26d5c910..5aa1e87de607c31282dec602978624de9e636cba:/script.php
diff --git a/script.php b/script.php
index be29f3d..8ebcce3 100644
--- a/script.php
+++ b/script.php
@@ -44,7 +44,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count($_GET) == 0) {
Scripting interface
This interface permits to script your uploads and downloads.
-
See source code of this interface to get available calls :)
+
See source code of this interface to get available calls :)
You may download a preconfigured Bash Script to easily send to and get files from the API via command line.
@@ -81,13 +81,13 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES)
$key = '';
if (isset($_POST['key'])) {
$key = $_POST['key'];
- if ($cfg['download_password_requirement'] !== 'generated' && $cfg['download_password_policy'] === 'regex'){
- if (!preg_match($cfg['download_password_policy_regex'], $key)){
+ if ($cfg['download_password_requirement'] !== 'generated' && $cfg['download_password_policy'] === 'regex') {
+ if (!preg_match($cfg['download_password_policy_regex'], $key)) {
echo 'Error 14: The download password is not complying to the security standards.';
exit;
}
}
- }elseif ($cfg['download_password_requirement'] !== 'optional'){
+ } elseif ($cfg['download_password_requirement'] !== 'optional') {
echo 'Error 13: The parameter password is required.';
exit;
}
@@ -175,13 +175,13 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES)
$key = '';
if (isset($_POST['key'])) {
$key = $_POST['key'];
- if ($cfg['download_password_requirement'] !== 'generated' && $cfg['download_password_policy'] === 'regex'){
- if (!preg_match($cfg['download_password_policy_regex'], $key)){
+ if ($cfg['download_password_requirement'] !== 'generated' && $cfg['download_password_policy'] === 'regex') {
+ if (!preg_match($cfg['download_password_policy_regex'], $key)) {
echo 'Error 14: The download password is not complying to the security standards.';
exit;
}
}
- }elseif ($cfg['download_password_requirement'] !== 'optional'){
+ } elseif ($cfg['download_password_requirement'] !== 'optional') {
echo 'Error 13: The parameter password is required.';
exit;
}
@@ -451,13 +451,13 @@ elseif (isset($_GET['init_async'])) {
$key = '';
if (isset($_POST['key'])) {
$key = $_POST['key'];
- if ($cfg['download_password_requirement'] !== 'generated' && $cfg['download_password_policy'] === 'regex'){
- if (!preg_match($cfg['download_password_policy_regex'], $key)){
+ if ($cfg['download_password_requirement'] !== 'generated' && $cfg['download_password_policy'] === 'regex') {
+ if (!preg_match($cfg['download_password_policy_regex'], $key)) {
echo 'Error 14: The download password is not complying to the security standards.';
exit;
}
}
- }elseif ($cfg['download_password_requirement'] !== 'optional'){
+ } elseif ($cfg['download_password_requirement'] !== 'optional') {
echo 'Error 13: The parameter password is required.';
exit;
}