From 132f296f03b6e2cb43ee3107e9bf7184d022f135 Mon Sep 17 00:00:00 2001 From: Bennett Blodinger Date: Tue, 20 Oct 2020 08:13:52 -0500 Subject: [PATCH 1/5] Fix typo --- resources/views/settings/barcodes.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/settings/barcodes.blade.php b/resources/views/settings/barcodes.blade.php index 892389574..931c6bf20 100644 --- a/resources/views/settings/barcodes.blade.php +++ b/resources/views/settings/barcodes.blade.php @@ -128,7 +128,7 @@
-

This will attempt to delete cached barcodes. This would typically only be used if your barcode dettings have changed, or if your Snipe-IT URL has changed. Barcodes will be re-generated when accessed next.

+

This will attempt to delete cached barcodes. This would typically only be used if your barcode settings have changed, or if your Snipe-IT URL has changed. Barcodes will be re-generated when accessed next.

From 1687e4b850e183433fc97527701619da2490579a Mon Sep 17 00:00:00 2001 From: Folke Ashberg Date: Wed, 21 Oct 2020 09:49:39 +0200 Subject: [PATCH 2/5] Fix for Issue #8543 * trustedproxy.php sets 'proxies' again according to env('APP_TRUSTED_PROXIES') again --- config/trustedproxy.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/trustedproxy.php b/config/trustedproxy.php index bde40fc7e..04e90ac2d 100644 --- a/config/trustedproxy.php +++ b/config/trustedproxy.php @@ -33,7 +33,8 @@ return [ * how many proxies that client's request has * subsequently passed through. */ - 'proxies' => null, // [,], '*' + 'proxies' => env('APP_TRUSTED_PROXIES') !== null ? + explode(',', env('APP_TRUSTED_PROXIES')) : '*', /* * To trust one or more specific proxies that connect From 90dddee923f4274400dde794e5d008e55f4720c4 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 21 Oct 2020 12:00:40 -0700 Subject: [PATCH 3/5] =?UTF-8?q?Remove=20the=20storage=20moving=20commands?= =?UTF-8?q?=20-=20we=20don=E2=80=99t=20use=20this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upgrade.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/upgrade.php b/upgrade.php index 06d01e7ea..47edadeae 100644 --- a/upgrade.php +++ b/upgrade.php @@ -187,29 +187,6 @@ $up = shell_exec('php artisan up'); echo '-- '.$up."\n\n"; -echo "--------------------------------------------------------\n"; -echo "Step 11: Checking for v5 public storage directories: \n"; -echo "--------------------------------------------------------\n\n"; - - -if ((!file_exists('storage/app/public')) && (!is_dir('storage/app/public'))) { - echo "- No public directory found in storage/app - creating one.\n\n"; - if (!mkdir('storage/app/public', 0777, true)) { - echo "ERROR: Failed to create directory at storage/app/public. You should do this manually.\n\n"; - } - $storage_simlink = shell_exec('php artisan storage:link'); - echo $storage_simlink; - -} else { - echo "- Public storage directory already exists. Skipping...\n\n"; -} - -echo "- Copying files into storage/app/public.\n\n"; -if (rmove('public/uploads','storage/app/public')) { - echo "- Copy successful.\n\n"; -} else { - echo "- Copy failed - you should do this manually by copying the files from public/uploads into the storage/app/public directory.\n\n"; -} echo "--------------------------------------------------------\n"; echo "FINISHED! Clear your browser cookies and re-login to use :\n"; From 33236f16acd0cd5ab7ef491a9480d70e701d4dde Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 21 Oct 2020 12:01:36 -0700 Subject: [PATCH 4/5] Bumped minor version --- config/version.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/version.php b/config/version.php index 6e72703d9..c02d8d2ac 100644 --- a/config/version.php +++ b/config/version.php @@ -1,10 +1,10 @@ 'v5.0.0', - 'full_app_version' => 'v5.0.0 - build 4484-g33cf4896d', - 'build_version' => '4484', + 'app_version' => 'v5.0.1', + 'full_app_version' => 'v5.0.1 - build 5383-g870b097f0', + 'build_version' => '5383', 'prerelease_version' => '', - 'hash_version' => 'g33cf4896d', - 'full_hash' => 'v5.0.0-1-g33cf4896d', + 'hash_version' => 'g870b097f0', + 'full_hash' => 'v5.0.0-1-g870b097f0', 'branch' => 'develop', ); \ No newline at end of file From 137982187601bdba858bcd5aedea9274d5726f72 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 21 Oct 2020 12:02:25 -0700 Subject: [PATCH 5/5] =?UTF-8?q?Removed=20accompanying=20method,=20since=20?= =?UTF-8?q?we=20don=E2=80=99t=20use=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upgrade.php | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/upgrade.php b/upgrade.php index 47edadeae..487874870 100644 --- a/upgrade.php +++ b/upgrade.php @@ -194,34 +194,3 @@ echo "your upgraded Snipe-IT.\n"; echo "--------------------------------------------------------\n\n"; -/** - * Recursively move files from one directory to another - * - * @param String $src - Source of files being moved - * @param String $dest - Destination of files being moved - */ -function rmove($src, $dest){ - - // If source is not a directory stop processing - if(!is_dir($src)) return false; - - // If the destination directory does not exist create it - if(!is_dir($dest)) { - if(!mkdir($dest)) { - // If the destination directory could not be created stop processing - return false; - } - } - - // Open the source directory to read in files - $i = new DirectoryIterator($src); - foreach($i as $f) { - if($f->isFile()) { - rename($f->getRealPath(), "$dest/" . $f->getFilename()); - } else if(!$f->isDot() && $f->isDir()) { - rmove($f->getRealPath(), "$dest/$f"); - unlink($f->getRealPath()); - } - } - unlink($src); -}