frederik-hoeft / pmdbs

(Terminated) A password manager featuring an optional online mode to sync your data across your Windows and Android devices.
1 stars 0 forks source link

Sync(): Invalid HMAC Checksum #101

Closed frederik-hoeft closed 5 years ago

frederik-hoeft commented 5 years ago

Fails for bigger test data set.

Server log:

SERVER <--- DB-QUERY: SYNCHRONIZE      <--- 192.168.178.21:13745
SERVER ---> RETURNED SYNDATA           ---> 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: INSERT DATA      <--- 192.168.178.21:13745
SERVER <--- DB-QUERY: SELECT DATA      <--- 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER <-#- [ERRNO 17] SQLE            -#-> 192.168.178.21:13745
SERVER ---> RETURNED STATUS            ---> 192.168.178.21:13745
SERVER <-#- [ERRNO 17] SQLE            -#-> 192.168.178.21:13745
SERVER <-#- [ERRNO 17] SQLE            -#-> 192.168.178.21:13745
SERVER <-#- [ERRNO 17] SQLE            -#-> 192.168.178.21:13745
SERVER ---> RETURNED DATA              ---> 192.168.178.21:13745
SERVER ---> LOGGED OUT                 ---> 192.168.178.21:13745
SERVER <-#- [ERRNO 00] UNKN            -#-> 192.168.178.21:13745
Exception in thread Thread-48:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "dbserver.py", line 5141, in Handler
    Management.Logout(clientAddress, clientSocket, aesKey, False)
  File "dbserver.py", line 4119, in Logout
    Network.SendEncrypted(clientSocket, aesKey, returnData)
  File "dbserver.py", line 276, in SendEncrypted
    clientSocket.send(b'\x01' + bytes("E" + encryptedData + CryptoHelper.CalculateHMAC(hmacKeys[0], hmacKeys[1], encryptedData), "utf-8") + b'\x04')
TypeError: 'bool' object is not subscriptable

Exception in thread Thread-71:
Traceback (most recent call last):
  File "dbserver.py", line 590, in Select
    Network.SendEncrypted(clientSocket, aesKey, returnData)
  File "dbserver.py", line 276, in SendEncrypted
    clientSocket.send(b'\x01' + bytes("E" + encryptedData + CryptoHelper.CalculateHMAC(hmacKeys[0], hmacKeys[1], encryptedData), "utf-8") + b'\x04')
TypeError: 'bool' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "dbserver.py", line 600, in Select
    Handle.Error("UNKN", e, clientAddress, clientSocket, aesKey, True)
  File "dbserver.py", line 1108, in Error
    Network.SendEncrypted(clientSocket, aesKey, returnData)
  File "dbserver.py", line 276, in SendEncrypted
    clientSocket.send(b'\x01' + bytes("E" + encryptedData + CryptoHelper.CalculateHMAC(hmacKeys[0], hmacKeys[1], encryptedData), "utf-8") + b'\x04')
TypeError: 'bool' object is not subscriptable