Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix 2 step confirmation password is now checked if it is enabled

peaklabs-devff60189285fd
diff --git a/app/Livewire/NavbarDeleteTeam.php b/app/Livewire/NavbarDeleteTeam.php
index 2c45de269c..10ba0c86a5 100644
--- a/app/Livewire/NavbarDeleteTeam.php
+++ b/app/Livewire/NavbarDeleteTeam.php
@@ -19,7 +19,7 @@ class NavbarDeleteTeam extends Component
public function delete($password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Project/Database/BackupEdit.php b/app/Livewire/Project/Database/BackupEdit.php
index d356d739ca..016218b789 100644
--- a/app/Livewire/Project/Database/BackupEdit.php
+++ b/app/Livewire/Project/Database/BackupEdit.php
@@ -59,7 +59,7 @@ class BackupEdit extends Component
public function delete($password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Project/Database/BackupExecutions.php b/app/Livewire/Project/Database/BackupExecutions.php
index 30c01fc3d6..d7ac180978 100644
--- a/app/Livewire/Project/Database/BackupExecutions.php
+++ b/app/Livewire/Project/Database/BackupExecutions.php
@@ -42,7 +42,7 @@ class BackupExecutions extends Component
public function deleteBackup($executionId, $password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Project/Service/FileStorage.php b/app/Livewire/Project/Service/FileStorage.php
index 2b6f18ec23..4d070bc0cc 100644
--- a/app/Livewire/Project/Service/FileStorage.php
+++ b/app/Livewire/Project/Service/FileStorage.php
@@ -88,7 +88,7 @@ class FileStorage extends Component
public function delete($password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Project/Service/ServiceApplicationView.php b/app/Livewire/Project/Service/ServiceApplicationView.php
index 22d4cf4cbd..8324ee645c 100644
--- a/app/Livewire/Project/Service/ServiceApplicationView.php
+++ b/app/Livewire/Project/Service/ServiceApplicationView.php
@@ -50,7 +50,7 @@ class ServiceApplicationView extends Component
public function delete($password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Project/Shared/Danger.php b/app/Livewire/Project/Shared/Danger.php
index c7aad89ef3..2a21532ce6 100644
--- a/app/Livewire/Project/Shared/Danger.php
+++ b/app/Livewire/Project/Shared/Danger.php
@@ -92,7 +92,7 @@ class Danger extends Component
public function delete($password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Project/Shared/Destination.php b/app/Livewire/Project/Shared/Destination.php
index 1e872c60ae..c305e817cf 100644
--- a/app/Livewire/Project/Shared/Destination.php
+++ b/app/Livewire/Project/Shared/Destination.php
@@ -119,7 +119,7 @@ class Destination extends Component
public function removeServer(int $network_id, int $server_id, $password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Project/Shared/Storages/Show.php b/app/Livewire/Project/Shared/Storages/Show.php
index 4c93030335..54b1be3af5 100644
--- a/app/Livewire/Project/Shared/Storages/Show.php
+++ b/app/Livewire/Project/Shared/Storages/Show.php
@@ -41,7 +41,7 @@ class Show extends Component
public function delete($password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Server/Delete.php b/app/Livewire/Server/Delete.php
index 606977b20f..cc2b335e19 100644
--- a/app/Livewire/Server/Delete.php
+++ b/app/Livewire/Server/Delete.php
@@ -17,7 +17,7 @@ class Delete extends Component
public function delete($password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
diff --git a/app/Livewire/Team/AdminView.php b/app/Livewire/Team/AdminView.php
index 25af875bba..700c30f0a8 100644
--- a/app/Livewire/Team/AdminView.php
+++ b/app/Livewire/Team/AdminView.php
@@ -78,7 +78,7 @@ class AdminView extends Component
public function delete($id, $password)
{
- if (! InstanceSettings::get('disable_two_step_confirmation')) {
+ if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');