Removed password from firmware updates

This commit is contained in:
David Carley
2021-10-05 23:58:30 -07:00
parent 44d19911b7
commit bdcc5a56df
3 changed files with 89 additions and 132 deletions

View File

@@ -257,14 +257,9 @@ class FirmwareUpdateHandler(bbctrl.APIHandler):
def put_ok(self):
if not 'password' in self.request.arguments:
raise HTTPError(401, 'Missing "password"')
if not 'firmware' in self.request.files:
raise HTTPError(401, 'Missing "firmware"')
check_password(self.request.arguments['password'][0])
firmware = self.request.files['firmware'][0]
if not os.path.exists('firmware'): os.mkdir('firmware')
@@ -278,7 +273,6 @@ class FirmwareUpdateHandler(bbctrl.APIHandler):
class UpgradeHandler(bbctrl.APIHandler):
def put_ok(self):
check_password(self.json['password'])
self.get_ctrl().lcd.goodbye('Upgrading firmware')
subprocess.Popen(['/usr/local/bin/upgrade-bbctrl'])