From 67ac104b4b7914d882e78f6e5e849a443f60b1b5 Mon Sep 17 00:00:00 2001 From: RundelhausCode Date: Tue, 16 Mar 2021 12:46:44 +0100 Subject: [PATCH] fix --- Backend/Controllers/Admin/AdminLogin.php | 6 +- .../Controllers/FileHandler/FileHandler.php | 8 +-- .../Controllers/FileHandler/GetGameData.php | 3 - .../Controllers/FileHandler/updateFiles.php | 6 +- Backend/Controllers/FileHandler/upload.php | 5 +- Backend/Controllers/Group/Login.php | 5 +- Backend/Controllers/Group/SigningUp.php | 8 +-- Backend/Controllers/Group/UpdateGruop.php | 2 +- Backend/Controllers/Polls/321vote.php | 2 +- Backend/Controllers/Polls/GetVote.php | 2 +- Backend/Controllers/Polls/Vote.php | 2 +- Backend/Controllers/keyWord/NewKeyWord.php | 4 +- Backend/Main.php | 2 + composer.json | 2 +- composer.lock | 60 +++++++++---------- 15 files changed, 56 insertions(+), 61 deletions(-) diff --git a/Backend/Controllers/Admin/AdminLogin.php b/Backend/Controllers/Admin/AdminLogin.php index d5f8aed..bf4e497 100644 --- a/Backend/Controllers/Admin/AdminLogin.php +++ b/Backend/Controllers/Admin/AdminLogin.php @@ -19,17 +19,17 @@ if(isset($_POST['aLogin'])){ $_SESSION['userName'] = $userName; $_SESSION['admin'] = true; $_SESSION['success'] = "You are now logged in"; - header('location: ../../../Frontend/index.php?login=success'); + header('location: ../../../Frontend/index.html?login=success'); }else{ session_destroy(); - header('location: ../../../Frontend/index.php?login=failed?reason=password'); + header('location: ../../../Frontend/index.html?login=failed?reason=password'); } } else{ session_destroy(); - header('location: ../../../Frontend/index.php?login=failed?reason=username'); + header('location: ../../../Frontend/index.html?login=failed?reason=username'); } diff --git a/Backend/Controllers/FileHandler/FileHandler.php b/Backend/Controllers/FileHandler/FileHandler.php index 7abe854..8759e5e 100644 --- a/Backend/Controllers/FileHandler/FileHandler.php +++ b/Backend/Controllers/FileHandler/FileHandler.php @@ -15,13 +15,13 @@ function ZipFileHandler(string $gameFileName, string $gameFileTmp){ if(in_array($headerType,$headerTypeMatch)){ $gameFileNewName = uniqid("", true). "." . $fileActualExtGame; if(empty($gameFileName)){ - header("location: ../../../Frontend/index.php?error=emptyFile"); + header("location: ../../../Frontend/index.html?error=emptyFile"); exit(); } rename($gameFileTmp,"../../Games/".$gameFileNewName); return $gameFileNewName; }else{ - header("location: location: ../../../Frontend/index.php?error=Wrong%20File%20Type"); + header("location: location: ../../../Frontend/index.html?error=Wrong%20File%20Type"); } return NULL; } @@ -41,13 +41,13 @@ function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){ if(in_array($headerType,$headerTypeMatch)){ $thumbnailFileNewName = uniqid("", true). "." . $fileActualExtThumb; if(empty($thumbnailFileName)){ - header("location: ../../../Frontend/index.php?error=emptyFile"); + header("location: ../../../Frontend/index.html?error=emptyFile"); exit(); } rename($thumbnailFileTmp,"../../../Frontend/images/".$thumbnailFileNewName); return $thumbnailFileNewName; }else{ - header("location: location: ../../../Frontend/index.php?error=Wrong%20File%20Type"); + header("location: location: ../../../Frontend/index.html?error=Wrong%20File%20Type"); } return NULL; } \ No newline at end of file diff --git a/Backend/Controllers/FileHandler/GetGameData.php b/Backend/Controllers/FileHandler/GetGameData.php index 55b85f6..90c00bd 100644 --- a/Backend/Controllers/FileHandler/GetGameData.php +++ b/Backend/Controllers/FileHandler/GetGameData.php @@ -2,9 +2,6 @@ require_once "../../../bootstrap.php"; use \Backend\Models\GameData; use \Backend\Models\Group; -use \Backend\Models\GameJam; - - if(isset($_GET['gameDataId'])){ $openGameDataStream = GameData::find($_GET['gameDataId']); diff --git a/Backend/Controllers/FileHandler/updateFiles.php b/Backend/Controllers/FileHandler/updateFiles.php index 683a12b..14f2af7 100644 --- a/Backend/Controllers/FileHandler/updateFiles.php +++ b/Backend/Controllers/FileHandler/updateFiles.php @@ -4,9 +4,7 @@ require_once('../Group/Group.php'); require_once('FileHandler.php'); use Backend\Models\GameData; -session_start(); - -if(isset($_SESSION['token'])){ +if(isLogin()){ if(isset($_POST['submitUpdate'])){ $gameFile = $_FILES['gameFile']; $desc = $_POST['description']; @@ -41,5 +39,5 @@ if(isset($_SESSION['token'])){ $gameData->save(); } }else{ - header("location: ../Backend/Main.php?error=NoLogin"); + header("location: ../../../Frontend/index.html?error=NoLogin"); } \ No newline at end of file diff --git a/Backend/Controllers/FileHandler/upload.php b/Backend/Controllers/FileHandler/upload.php index 1b77154..b71b1ba 100644 --- a/Backend/Controllers/FileHandler/upload.php +++ b/Backend/Controllers/FileHandler/upload.php @@ -8,7 +8,6 @@ use Backend\Models\Group; $isImages = false; -session_start(); if(isLogin()){ @@ -46,8 +45,8 @@ if(isLogin()){ } } }else{ - header("location: ../../../Frontend/group.php?error=TooManyUploads"); + header("location: ../../../Frontend/index.html?error=TooManyUploads"); } }else{ - header("location: ../../../Main.php?error=NoLogin"); + header("location: ../../../Frontend/index.html?error=NoLogin"); } \ No newline at end of file diff --git a/Backend/Controllers/Group/Login.php b/Backend/Controllers/Group/Login.php index 83ce338..be2188f 100644 --- a/Backend/Controllers/Group/Login.php +++ b/Backend/Controllers/Group/Login.php @@ -1,6 +1,6 @@ diff --git a/composer.json b/composer.json index ab3aec1..1083192 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require": { - "illuminate/database": "^8.30", + "illuminate/database": "^8.30" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index 428ee73..0b2ef39 100644 --- a/composer.lock +++ b/composer.lock @@ -103,16 +103,16 @@ }, { "name": "illuminate/collections", - "version": "v8.31.0", + "version": "v8.32.1", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "ecc881c6dce66e22f2c236374f342d41c7ebeb67" + "reference": "d7cc717a00064b40fa63a8ad522042005e1de1ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/ecc881c6dce66e22f2c236374f342d41c7ebeb67", - "reference": "ecc881c6dce66e22f2c236374f342d41c7ebeb67", + "url": "https://api.github.com/repos/illuminate/collections/zipball/d7cc717a00064b40fa63a8ad522042005e1de1ed", + "reference": "d7cc717a00064b40fa63a8ad522042005e1de1ed", "shasum": "" }, "require": { @@ -153,11 +153,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-03-02T13:34:56+00:00" + "time": "2021-03-08T17:22:22+00:00" }, { "name": "illuminate/container", - "version": "v8.31.0", + "version": "v8.32.1", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", @@ -208,7 +208,7 @@ }, { "name": "illuminate/contracts", - "version": "v8.31.0", + "version": "v8.32.1", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -256,16 +256,16 @@ }, { "name": "illuminate/database", - "version": "v8.31.0", + "version": "v8.32.1", "source": { "type": "git", "url": "https://github.com/illuminate/database.git", - "reference": "87dd6cee1eb159dfcba95bd1d2ed59d3f3244b36" + "reference": "f6a10cebd9bbd188ca66993168fb453439dbb50f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/87dd6cee1eb159dfcba95bd1d2ed59d3f3244b36", - "reference": "87dd6cee1eb159dfcba95bd1d2ed59d3f3244b36", + "url": "https://api.github.com/repos/illuminate/database/zipball/f6a10cebd9bbd188ca66993168fb453439dbb50f", + "reference": "f6a10cebd9bbd188ca66993168fb453439dbb50f", "shasum": "" }, "require": { @@ -320,11 +320,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-03-04T13:08:15+00:00" + "time": "2021-03-09T14:06:15+00:00" }, { "name": "illuminate/macroable", - "version": "v8.31.0", + "version": "v8.32.1", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -370,16 +370,16 @@ }, { "name": "illuminate/support", - "version": "v8.31.0", + "version": "v8.32.1", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "978e64ffb68189b70fea77e4d401f43e88fa54ca" + "reference": "2ef7ff288366a1ebe32f633196a1b90bd443acc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/978e64ffb68189b70fea77e4d401f43e88fa54ca", - "reference": "978e64ffb68189b70fea77e4d401f43e88fa54ca", + "url": "https://api.github.com/repos/illuminate/support/zipball/2ef7ff288366a1ebe32f633196a1b90bd443acc3", + "reference": "2ef7ff288366a1ebe32f633196a1b90bd443acc3", "shasum": "" }, "require": { @@ -434,7 +434,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-03-04T14:09:31+00:00" + "time": "2021-03-05T15:22:14+00:00" }, { "name": "nesbot/carbon", @@ -630,16 +630,16 @@ }, { "name": "symfony/console", - "version": "v5.2.4", + "version": "v5.2.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d6d0cc30d8c0fda4e7b213c20509b0159a8f4556" + "reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d6d0cc30d8c0fda4e7b213c20509b0159a8f4556", - "reference": "d6d0cc30d8c0fda4e7b213c20509b0159a8f4556", + "url": "https://api.github.com/repos/symfony/console/zipball/938ebbadae1b0a9c9d1ec313f87f9708609f1b79", + "reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79", "shasum": "" }, "require": { @@ -707,7 +707,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.2.4" + "source": "https://github.com/symfony/console/tree/v5.2.5" }, "funding": [ { @@ -723,7 +723,7 @@ "type": "tidelift" } ], - "time": "2021-02-23T10:08:49+00:00" + "time": "2021-03-06T13:42:15+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1375,16 +1375,16 @@ }, { "name": "symfony/translation", - "version": "v5.2.4", + "version": "v5.2.5", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "74b0353ab34ff4cca827a2cf909e325d96815e60" + "reference": "0947ab1e3aabd22a6bef393874b2555d2bb976da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/74b0353ab34ff4cca827a2cf909e325d96815e60", - "reference": "74b0353ab34ff4cca827a2cf909e325d96815e60", + "url": "https://api.github.com/repos/symfony/translation/zipball/0947ab1e3aabd22a6bef393874b2555d2bb976da", + "reference": "0947ab1e3aabd22a6bef393874b2555d2bb976da", "shasum": "" }, "require": { @@ -1448,7 +1448,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.4" + "source": "https://github.com/symfony/translation/tree/v5.2.5" }, "funding": [ { @@ -1464,7 +1464,7 @@ "type": "tidelift" } ], - "time": "2021-03-04T15:41:09+00:00" + "time": "2021-03-06T07:59:01+00:00" }, { "name": "symfony/translation-contracts",