added addpeer command and misc bug fixes
This commit is contained in:
parent
71bff27245
commit
dd9a54f7c6
4 changed files with 12 additions and 2 deletions
|
@ -329,7 +329,8 @@ class Core:
|
|||
c = conn.cursor()
|
||||
command = (data, peer)
|
||||
# TODO: validate key on whitelist
|
||||
|
||||
if key not in ('id', 'text', 'name', 'pgpKey', 'hmacKey', 'blockDBHash', 'forwardKey', 'dateSeen', 'bytesStored', 'trust'):
|
||||
raise Exception("Got invalid database key when setting peer info")
|
||||
c.execute('UPDATE peers SET ' + key + ' = ? where id=?', command)
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue