Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #125 from meshtastic/wifi_password_fix
Browse files Browse the repository at this point in the history
do not write "sekrit" as wifi password
  • Loading branch information
mkinney authored Mar 1, 2022
2 parents ed3c892 + 934f9ee commit da73aa5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion meshtastic_flasher/wifi_and_mqtt_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ def write_prefs(self):
prefs = self.interface.getNode(BROADCAST_ADDR).radioConfig.preferences
setPref(prefs, 'wifi_ap_mode', f'{self.wifi_ap_mode.isChecked()}' )
setPref(prefs, 'wifi_ssid', self.wifi_ssid.text())
setPref(prefs, 'wifi_password', self.wifi_password.text())
# only write the password if is not the "obscured" password
if self.wifi_password.text() != 'sekrit':
setPref(prefs, 'wifi_password', self.wifi_password.text())
else:
print('Not saving the password.')
setPref(prefs, 'mqtt_disabled', f'{self.mqtt_disabled.isChecked()}' )
setPref(prefs, 'mqtt_server', self.mqtt_server.text())
setPref(prefs, 'mqtt_username', self.mqtt_username.text())
Expand Down

0 comments on commit da73aa5

Please sign in to comment.