Messagetype attack mitigation

- temporarily restrict messagetypes
- use a new "Contact support" address
master 0.6.3.1
Peter Šurda 5 years ago
parent 4cd36ececc
commit c050ef0814
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
  1. 4
      src/bitmessageqt/support.py
  2. 3
      src/messagetypes/__init__.py

@ -21,7 +21,8 @@ import state
from version import softwareVersion
# this is BM support address going to Peter Surda
SUPPORT_ADDRESS = 'BM-2cTkCtMYkrSPwFTpgcBrMrf5d8oZwvMZWK'
OLD_SUPPORT_ADDRESS = 'BM-2cTkCtMYkrSPwFTpgcBrMrf5d8oZwvMZWK'
SUPPORT_ADDRESS = 'BM-2cUdgkDDAahwPAU6oD2A7DnjqZz3hgY832'
SUPPORT_LABEL = 'PyBitmessage support'
SUPPORT_MY_LABEL = 'My new address'
SUPPORT_SUBJECT = 'Support request'
@ -53,6 +54,7 @@ Connected hosts: {}
'''
def checkAddressBook(myapp):
sqlExecute('''DELETE from addressbook WHERE address=?''', OLD_SUPPORT_ADDRESS)
queryreturn = sqlQuery('''SELECT * FROM addressbook WHERE address=?''', SUPPORT_ADDRESS)
if queryreturn == []:
sqlExecute('''INSERT INTO addressbook VALUES (?,?)''', str(QtGui.QApplication.translate("Support", SUPPORT_LABEL)), SUPPORT_ADDRESS)

@ -11,6 +11,9 @@ class MsgBase(object):
def constructObject(data):
whitelist = ["message"]
if data[""] not in whitelist:
return None
try:
m = import_module("messagetypes." + data[""])
classBase = getattr(m, data[""].title())

Loading…
Cancel
Save