mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Ensure generated device id is a valid file name
Former-commit-id: 950080785d4666364b5452a4e0b48ce999852ef8 [formerly 3147d9327b]
Former-commit-id: da5d01ac15b077cb2d63668ee9be491ef597a105
This commit is contained in:
+2
-2
@@ -300,8 +300,8 @@ def tweak(): # runs configuration wizard
|
||||
remove(f"{path.expanduser('~/.config/sshyp/devices/')}{_id}")
|
||||
print(f"{_divider}\u001b[4;1mimportant:\u001b[0m this id \u001b[4;1mmust\u001b[0m be unique amongst your "
|
||||
f"client devices\n\nthis is used to keep track of database syncing and quick-unlock permissions\n")
|
||||
_device_id_prefix = str(input('device id: '))
|
||||
_device_id_suffix = string_gen('c', randint(12, 48))
|
||||
_device_id_prefix = str(input('device id: ')) + '-'
|
||||
_device_id_suffix = string_gen('s', randint(24, 48))
|
||||
_device_id = _device_id_prefix + _device_id_suffix
|
||||
open(f"{path.expanduser('~/.config/sshyp/devices/')}{_device_id}", 'w')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user