Keep Classic service GM account outside managed bot account prefix
Core tests / core (push) Successful in 27s
Core tests / core (push) Successful in 27s
This commit is contained in:
@@ -14,7 +14,10 @@ def main(root):
|
|||||||
account_file=root/'classic-gm-credentials.json'
|
account_file=root/'classic-gm-credentials.json'
|
||||||
if account_file.exists():gm=json.loads(account_file.read_text())
|
if account_file.exists():gm=json.loads(account_file.read_text())
|
||||||
else:
|
else:
|
||||||
gm={'username':'AZCLASSICGM','password':secrets.token_hex(8)}
|
gm={'username':'AZAIADMIN','password':secrets.token_hex(8)}
|
||||||
|
account_file.write_text(json.dumps(gm));account_file.chmod(0o600)
|
||||||
|
if gm['username'].startswith('AZCLASSIC'):
|
||||||
|
gm['username']='AZAIADMIN'
|
||||||
account_file.write_text(json.dumps(gm));account_file.chmod(0o600)
|
account_file.write_text(json.dumps(gm));account_file.chmod(0o600)
|
||||||
salt=secrets.token_bytes(32)
|
salt=secrets.token_bytes(32)
|
||||||
digest=hashlib.sha1((gm['username'].upper()+':'+gm['password'].upper()).encode()).digest()
|
digest=hashlib.sha1((gm['username'].upper()+':'+gm['password'].upper()).encode()).digest()
|
||||||
|
|||||||
Reference in New Issue
Block a user