From 8aed54f4426bdb8671029bbd2c1bf1540b69be7b Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Tue, 24 Sep 2024 23:20:45 +0200 Subject: [PATCH 1/3] Allow the password... password --- .../axe-os/src/app/components/edit/edit.component.ts | 8 ++++---- .../src/app/components/settings/settings.component.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.ts b/main/http_server/axe-os/src/app/components/edit/edit.component.ts index de02df109..6ed2c751d 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.ts +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.ts @@ -147,10 +147,10 @@ export class EditComponent implements OnInit { Validators.max(65353) ]], stratumUser: [info.stratumUser, [Validators.required]], - stratumPassword: ['password', [Validators.required]], + stratumPassword: ['*****', [Validators.required]], hostname: [info.hostname, [Validators.required]], ssid: [info.ssid, [Validators.required]], - wifiPass: ['password'], + wifiPass: ['*****'], coreVoltage: [info.coreVoltage, [Validators.required]], frequency: [info.frequency, [Validators.required]], autofanspeed: [info.autofanspeed == 1, [Validators.required]], @@ -187,10 +187,10 @@ export class EditComponent implements OnInit { const form = this.form.getRawValue(); - if (form.wifiPass === 'password') { + if (form.wifiPass === '*****') { delete form.wifiPass; } - if (form.stratumPassword === 'password') { + if (form.stratumPassword === '*****') { delete form.stratumPassword; } diff --git a/main/http_server/axe-os/src/app/components/settings/settings.component.ts b/main/http_server/axe-os/src/app/components/settings/settings.component.ts index d274ca1b8..2ac2c7e6f 100644 --- a/main/http_server/axe-os/src/app/components/settings/settings.component.ts +++ b/main/http_server/axe-os/src/app/components/settings/settings.component.ts @@ -70,9 +70,9 @@ export class SettingsComponent { Validators.max(65353) ]], stratumUser: [info.stratumUser, [Validators.required]], - stratumPassword: ['password', [Validators.required]], + stratumPassword: ['*****', [Validators.required]], ssid: [info.ssid, [Validators.required]], - wifiPass: ['password'], + wifiPass: ['*****'], coreVoltage: [info.coreVoltage, [Validators.required]], frequency: [info.frequency, [Validators.required]], autofanspeed: [info.autofanspeed == 1, [Validators.required]], @@ -116,10 +116,10 @@ export class SettingsComponent { form.invertfanpolarity = form.invertfanpolarity == true ? 1 : 0; form.autofanspeed = form.autofanspeed == true ? 1 : 0; - if (form.wifiPass === 'password') { + if (form.wifiPass === '*****') { delete form.wifiPass; } - if (form.stratumPassword === 'password') { + if (form.stratumPassword === '*****') { delete form.stratumPassword; } From 82113ab25340e4fa1133c7dcc76f2310c966202b Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Tue, 24 Sep 2024 23:41:49 +0200 Subject: [PATCH 2/3] Allow empty wifi passwords --- .../axe-os/src/app/components/settings/settings.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/http_server/axe-os/src/app/components/settings/settings.component.ts b/main/http_server/axe-os/src/app/components/settings/settings.component.ts index 2ac2c7e6f..a6719cfcf 100644 --- a/main/http_server/axe-os/src/app/components/settings/settings.component.ts +++ b/main/http_server/axe-os/src/app/components/settings/settings.component.ts @@ -116,6 +116,9 @@ export class SettingsComponent { form.invertfanpolarity = form.invertfanpolarity == true ? 1 : 0; form.autofanspeed = form.autofanspeed == true ? 1 : 0; + // Allow an empty wifi password + form.wifiPass = form.wifiPass == null ? '' : form.wifiPass; + if (form.wifiPass === '*****') { delete form.wifiPass; } From cfed4c51af652c5381e337249de9ab85cb1823ab Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Tue, 24 Sep 2024 23:42:31 +0200 Subject: [PATCH 3/3] Allow empty wifi passwords --- .../axe-os/src/app/components/edit/edit.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.ts b/main/http_server/axe-os/src/app/components/edit/edit.component.ts index 6ed2c751d..991a2769b 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.ts +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.ts @@ -187,6 +187,9 @@ export class EditComponent implements OnInit { const form = this.form.getRawValue(); + // Allow an empty wifi password + form.wifiPass = form.wifiPass == null ? '' : form.wifiPass; + if (form.wifiPass === '*****') { delete form.wifiPass; }