diff --git a/.github/stale.yml b/.github/stale.yml index 4aead8d18dfa..991cdf27bdf4 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -9,6 +9,10 @@ exemptLabels: - :woman_technologist: ready for dev - :moneybag: bounty - :hand: bug + - "🔐 security" + - "👩‍💻 ready for dev" + - "💰 bounty" + - "✋ bug" # Label to use when marking an issue as stale staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable diff --git a/Dockerfile b/Dockerfile index d7752ff10052..acd69f5a3fc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ patch \ curl \ vim \ git \ +cron \ mysql-client \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/Vagrantfile b/Vagrantfile index eabfe07b4901..b65979b7e910 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,6 +5,14 @@ SNIPEIT_SH_URL= "https://raw.githubusercontent.com/snipe/snipe-it/master/snipeit NETWORK_BRIDGE= "en0: Wi-Fi (AirPort)" Vagrant.configure("2") do |config| + config.vm.define "bionic" do |bionic| + bionic.vm.box = "ubuntu/bionic64" + bionic.vm.hostname = 'bionic' + bionic.vm.network "public_network", bridge: NETWORK_BRIDGE + bionic.vm.provision :shell, :inline => "wget #{SNIPEIT_SH_URL}" + bionic.vm.provision :shell, :inline => "chmod 755 snipeit.sh" + end + config.vm.define "xenial" do |xenial| xenial.vm.box = "ubuntu/xenial64" xenial.vm.hostname = 'xenial' diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index d2c8fe25d8d3..1557991c0179 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -396,6 +396,7 @@ public function postBranding(ImageUploadRequest $request) $setting->brand = $request->input('brand', '1'); $setting->header_color = $request->input('header_color'); $setting->support_footer = $request->input('support_footer'); + $setting->version_footer = $request->input('version_footer'); $setting->footer_text = $request->input('footer_text'); $setting->skin = $request->input('skin'); $setting->show_url_in_emails = $request->input('show_url_in_emails', '0'); diff --git a/app/Importer/UserImporter.php b/app/Importer/UserImporter.php index 4e852e621d47..258f3390607e 100644 --- a/app/Importer/UserImporter.php +++ b/app/Importer/UserImporter.php @@ -37,7 +37,6 @@ public function createUserIfNotExists(array $row) $this->item['phone'] = $this->findCsvMatch($row, 'phone_number'); $this->item['jobtitle'] = $this->findCsvMatch($row, 'jobtitle'); $this->item['employee_num'] = $this->findCsvMatch($row, 'employee_num'); - $this->item['password'] = $this->tempPassword; $user = User::where('username', $this->item['username'])->first(); if ($user) { if (!$this->updating) { @@ -45,11 +44,14 @@ public function createUserIfNotExists(array $row) return; } $this->log('Updating User'); - // $user = $this->users[$userId]; $user->update($this->sanitizeItemForUpdating($user)); $user->save(); return; } + // This needs to be applied after the update logic, otherwise we'll overwrite user passwords + // Issue #5408 + $this->item['password'] = $this->tempPassword; + $this->log("No matching user, creating one"); $user = new User(); $user->fill($this->sanitizeItemForStoring($user)); diff --git a/app/Models/AssetModel.php b/app/Models/AssetModel.php index 79a91c284be5..dde11702ac29 100755 --- a/app/Models/AssetModel.php +++ b/app/Models/AssetModel.php @@ -153,7 +153,7 @@ public function scopeInCategory($query, array $categoryIdListing) * @param $query * * @return $query - * @author Daniel Meltzer * @version v3.5 */ public function scopeRequestableModels($query) diff --git a/app/Models/Loggable.php b/app/Models/Loggable.php index f74f453c26a0..61b1d6deb743 100644 --- a/app/Models/Loggable.php +++ b/app/Models/Loggable.php @@ -21,7 +21,7 @@ trait Loggable { /** - * @author Daniel Meltzer * @since [v3.4] * @return \App\Models\Actionlog */ @@ -32,7 +32,7 @@ public function log() } /** - * @author Daniel Meltzer * @since [v3.4] * @return \App\Models\Actionlog */ @@ -106,7 +106,7 @@ private function determineLogItemType($log) return $log; } /** - * @author Daniel Meltzer * @since [v3.4] * @return \App\Models\Actionlog */ @@ -204,7 +204,7 @@ public function logAudit($note, $location_id, $filename = null) /** - * @author Daniel Meltzer * @since [v3.5] * @return \App\Models\Actionlog */ @@ -231,7 +231,7 @@ public function logCreate($note = null) } /** - * @author Daniel Meltzer * @since [v3.4] * @return \App\Models\Actionlog */ diff --git a/app/Presenters/AccessoryPresenter.php b/app/Presenters/AccessoryPresenter.php index e38b134b8341..1dc0f77ef3c6 100644 --- a/app/Presenters/AccessoryPresenter.php +++ b/app/Presenters/AccessoryPresenter.php @@ -1,11 +1,4 @@ char('version_footer', 5)->nullable()->default('on'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('settings', function (Blueprint $table) { + $table->dropColumn('version_footer'); + }); + } +} diff --git a/resources/lang/en/admin/settings/general.php b/resources/lang/en/admin/settings/general.php index 753fbb0d7196..fb68f122057a 100644 --- a/resources/lang/en/admin/settings/general.php +++ b/resources/lang/en/admin/settings/general.php @@ -121,7 +121,9 @@ 'slack_test_help' => 'Test whether your Slack integration is configured correctly. YOU MUST SAVE YOUR UPDATED SLACK SETTINGS FIRST.', 'snipe_version' => 'Snipe-IT version', 'support_footer' => 'Support Footer Links ', - 'support_footer_help' => 'Specify who sees the links to the Snipe-IT Support info and Users Manual', + 'support_footer_help' => 'Specify who sees the links to the Snipe-IT Support info and Users Manual.', + 'version_footer' => 'Version in Footer ', + 'version_footer_help' => 'Specify who sees the Snipe-IT version and build number.', 'system' => 'System Information', 'update' => 'Update Settings', 'value' => 'Value', diff --git a/resources/macros/macros.php b/resources/macros/macros.php index d0a50875ecba..c391700b9b46 100644 --- a/resources/macros/macros.php +++ b/resources/macros/macros.php @@ -366,12 +366,14 @@ 'd M, Y', 'm/d/Y', 'n/d/y', + 'd/m/Y', 'm/j/Y', 'd.m.Y', ]; foreach ($formats as $format) { - $date_display_formats[$format] = Carbon::now()->format($format); + + $date_display_formats[$format] = Carbon::parse(date('Y').'-'.date('m').'-25')->format($format); } $select = '