From b910db0617b4ce62a66bef700c1a3cde7983e483 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 30 Jun 2022 21:01:58 -0700 Subject: [PATCH] Fixed #11393 - reject acceptance if no file is present Signed-off-by: snipe --- app/Http/Controllers/Account/AcceptanceController.php | 6 ++++++ resources/lang/en/general.php | 1 + resources/views/account/accept/create.blade.php | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index e81a0329de..4868602f08 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -133,6 +133,12 @@ class AcceptanceController extends Controller $encoded_image = explode(',', $data_uri); $decoded_image = base64_decode($encoded_image[1]); Storage::put('private_uploads/signatures/'.$sig_filename, (string) $decoded_image); + + // No image data is present, kick them back. + // This mostly only applies to users on supoer-deuper crapola browsers *cough* IE *cough* + } else { + return redirect()->back()->with('error', trans('general.shitty_browser')); + } diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index c4d2798035..98610ac232 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -363,5 +363,6 @@ return [ 'purge_not_allowed' => 'Purging deleted data has been disabled in the .env file. Contact support or your systems administrator.', 'backup_delete_not_allowed' => 'Deleting backups has been disabled in the .env file. Contact support or your systems administrator.', 'additional_files' => 'Additional Files', + 'shitty_browser' => 'No signature detected. If you are using an older browser, please use a more modern browser to complete your asset acceptance.', ]; \ No newline at end of file diff --git a/resources/views/account/accept/create.blade.php b/resources/views/account/accept/create.blade.php index 5c2843b453..e5725e4897 100644 --- a/resources/views/account/accept/create.blade.php +++ b/resources/views/account/accept/create.blade.php @@ -40,7 +40,7 @@
-
+
@if ($acceptance->checkoutable->getEula())