Merge branch 'master' into flood-fill

This commit is contained in:
Kevin Froman 2020-10-29 20:58:17 +00:00
commit 44112750ec
8 changed files with 30 additions and 30 deletions

View File

@ -1,4 +1,4 @@
urllib3==1.25.10 urllib3==1.25.11
requests==2.24.0 requests==2.24.0
PyNaCl==1.4.0 PyNaCl==1.4.0
gevent==20.9.0 gevent==20.9.0
@ -10,7 +10,7 @@ unpaddedbase32==0.2.0
streamedrequests==1.0.3 streamedrequests==1.0.3
toomanyobjs==1.1.0 toomanyobjs==1.1.0
niceware==0.2.1 niceware==0.2.1
psutil==5.7.2 psutil==5.7.3
filenuke==0.0.0 filenuke==0.0.0
watchdog==0.10.3 watchdog==0.10.3
ujson==4.0.1 ujson==4.0.1

View File

@ -144,18 +144,18 @@ niceware==0.2.1 \
pathtools==0.1.2 \ pathtools==0.1.2 \
--hash=sha256:7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0 \ --hash=sha256:7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0 \
# via watchdog # via watchdog
psutil==5.7.2 \ psutil==5.7.3 \
--hash=sha256:0ee3c36428f160d2d8fce3c583a0353e848abb7de9732c50cf3356dd49ad63f8 \ --hash=sha256:01bc82813fbc3ea304914581954979e637bcc7084e59ac904d870d6eb8bb2bc7 \
--hash=sha256:10512b46c95b02842c225f58fa00385c08fa00c68bac7da2d9a58ebe2c517498 \ --hash=sha256:1cd6a0c9fb35ece2ccf2d1dd733c1e165b342604c67454fd56a4c12e0a106787 \
--hash=sha256:4080869ed93cce662905b029a1770fe89c98787e543fa7347f075ade761b19d6 \ --hash=sha256:2cb55ef9591b03ef0104bedf67cc4edb38a3edf015cf8cf24007b99cb8497542 \
--hash=sha256:5e9d0f26d4194479a13d5f4b3798260c20cecf9ac9a461e718eb59ea520a360c \ --hash=sha256:56c85120fa173a5d2ad1d15a0c6e0ae62b388bfb956bb036ac231fbdaf9e4c22 \
--hash=sha256:66c18ca7680a31bf16ee22b1d21b6397869dda8059dbdb57d9f27efa6615f195 \ --hash=sha256:5d9106ff5ec2712e2f659ebbd112967f44e7d33f40ba40530c485cc5904360b8 \
--hash=sha256:68d36986ded5dac7c2dcd42f2682af1db80d4bce3faa126a6145c1637e1b559f \ --hash=sha256:6a3e1fd2800ca45083d976b5478a2402dd62afdfb719b30ca46cd28bb25a2eb4 \
--hash=sha256:90990af1c3c67195c44c9a889184f84f5b2320dce3ee3acbd054e3ba0b4a7beb \ --hash=sha256:ade6af32eb80a536eff162d799e31b7ef92ddcda707c27bbd077238065018df4 \
--hash=sha256:a5b120bb3c0c71dfe27551f9da2f3209a8257a178ed6c628a819037a8df487f1 \ --hash=sha256:af73f7bcebdc538eda9cc81d19db1db7bf26f103f91081d780bbacfcb620dee2 \
--hash=sha256:d8a82162f23c53b8525cf5f14a355f5d1eea86fa8edde27287dd3a98399e4fdf \ --hash=sha256:e02c31b2990dcd2431f4524b93491941df39f99619b0d312dfe1d4d530b08b4b \
--hash=sha256:f2018461733b23f308c298653c8903d32aaad7873d25e1d228765e91ae42c3f2 \ --hash=sha256:fa38ac15dbf161ab1e941ff4ce39abd64b53fec5ddf60c23290daed2bc7d1157 \
--hash=sha256:ff1977ba1a5f71f89166d5145c3da1cea89a0fdb044075a12c720ee9123ec818 \ --hash=sha256:fbcac492cb082fa38d88587d75feb90785d05d7e12d4565cbf1ecc727aff71b7 \
# via -r requirements.in # via -r requirements.in
pycparser==2.19 \ pycparser==2.19 \
--hash=sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3 \ --hash=sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3 \
@ -228,9 +228,9 @@ unpaddedbase32==0.2.0 \
--hash=sha256:4aacee75f8fd6c8cf129842ecba45ca59c11bfb13dae19d86f32b48fa3715403 \ --hash=sha256:4aacee75f8fd6c8cf129842ecba45ca59c11bfb13dae19d86f32b48fa3715403 \
--hash=sha256:b7b780c31d27d55e66abf6c221216a35690ee8892c2daacff7f2528e229bd9c3 \ --hash=sha256:b7b780c31d27d55e66abf6c221216a35690ee8892c2daacff7f2528e229bd9c3 \
# via -r requirements.in # via -r requirements.in
urllib3==1.25.10 \ urllib3==1.25.11 \
--hash=sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a \ --hash=sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2 \
--hash=sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461 \ --hash=sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e \
# via -r requirements.in, requests # via -r requirements.in, requests
watchdog==0.10.3 \ watchdog==0.10.3 \
--hash=sha256:4214e1379d128b0588021880ccaf40317ee156d4603ac388b9adcf29165e0c04 \ --hash=sha256:4214e1379d128b0588021880ccaf40317ee156d4603ac388b9adcf29165e0c04 \

View File

@ -45,7 +45,8 @@ def connect_new_peer_to_communicator(shared_state, peer='', useBootstrap=False):
peerList = keydb.listkeys.list_adders() peerList = keydb.listkeys.list_adders()
mainPeerList = keydb.listkeys.list_adders() mainPeerList = keydb.listkeys.list_adders()
peerList = onionrpeers.get_score_sorted_peer_list() if not peerList:
peerList = onionrpeers.get_score_sorted_peer_list()
""" """
If we don't have enough peers connected or random chance, If we don't have enough peers connected or random chance,

View File

@ -23,7 +23,7 @@ import filepaths
DENIABLE_PEER_ADDRESS = "OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA" DENIABLE_PEER_ADDRESS = "OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA"
PASSWORD_LENGTH = 25 PASSWORD_LENGTH = 25
ONIONR_TAGLINE = 'Private P2P Communication - GPLv3 - https://Onionr.net' ONIONR_TAGLINE = 'Private P2P Communication - GPLv3 - https://Onionr.net'
ONIONR_VERSION = '6.1.1' ONIONR_VERSION = '6.2.0'
ONIONR_VERSION_CODENAME = 'Genesis' ONIONR_VERSION_CODENAME = 'Genesis'
ONIONR_VERSION_TUPLE = tuple(ONIONR_VERSION.split('.')) # (MAJOR, MINOR, VERSION) ONIONR_VERSION_TUPLE = tuple(ONIONR_VERSION.split('.')) # (MAJOR, MINOR, VERSION)
API_VERSION = '2' # increments of 1; only change when something fundamental about how the API works changes. This way other nodes know how to communicate without learning too much information about you. API_VERSION = '2' # increments of 1; only change when something fundamental about how the API works changes. This way other nodes know how to communicate without learning too much information about you.

View File

@ -36,7 +36,7 @@ def accept_upload(request):
resp = 'failure' resp = 'failure'
data = request.get_data() data = request.get_data()
data_size = sys.getsizeof(data) data_size = sys.getsizeof(data)
print(data)
if data_size < 30: if data_size < 30:
resp = 'size' resp = 'size'
elif data_size < 100000000: elif data_size < 100000000:

View File

@ -79,10 +79,7 @@ class Block:
# decrypt data # decrypt data
if self.getHeader('encryptType') == 'asym': if self.getHeader('encryptType') == 'asym':
try: try:
try: self.bcontent = encryption.pub_key_decrypt(self.bcontent, encodedData=False)
self.bcontent = encryption.pub_key_decrypt(self.bcontent, encodedData=encodedData)
except (binascii.Error, ValueError) as e:
self.bcontent = encryption.pub_key_decrypt(self.bcontent, encodedData=False)
bmeta = encryption.pub_key_decrypt(self.bmetadata, encodedData=encodedData) bmeta = encryption.pub_key_decrypt(self.bmetadata, encodedData=encodedData)
@ -93,9 +90,11 @@ class Block:
pass pass
self.bmetadata = json.loads(bmeta) self.bmetadata = json.loads(bmeta)
self.signature = encryption.pub_key_decrypt(self.signature, encodedData=encodedData) self.signature = encryption.pub_key_decrypt(self.signature, encodedData=encodedData)
self.signer = encryption.pub_key_decrypt(self.signer, encodedData=encodedData) self.signer = encryption.pub_key_decrypt(self.signer, encodedData=encodedData)
self.bheader['signer'] = self.signer.decode() self.bheader['signer'] = self.signer.decode()
self.signedData = json.dumps(self.bmetadata).encode() + self.bcontent self.signedData = json.dumps(self.bmetadata).encode() + self.bcontent
if not self.signer is None: if not self.signer is None:
if not self.verifySig(): if not self.verifySig():
@ -124,8 +123,8 @@ class Block:
except (onionrexceptions.DecryptionError, nacl.exceptions.CryptoError) as e: except (onionrexceptions.DecryptionError, nacl.exceptions.CryptoError) as e:
logger.error(str(e)) logger.error(str(e))
pass pass
except nacl.exceptions.CryptoError: except (nacl.exceptions.CryptoError,) as e:
logger.debug('Could not decrypt block. Either invalid key or corrupted data') logger.debug(f'Could not decrypt block. encodedData: {encodedData}. Either invalid key or corrupted data ' + str(e))
except onionrexceptions.ReplayAttack: except onionrexceptions.ReplayAttack:
logger.warn('%s is possibly a replay attack' % (self.hash,)) logger.warn('%s is possibly a replay attack' % (self.hash,))
else: else:

View File

@ -130,7 +130,7 @@
<div class="column is-2"> <div class="column is-2">
<div class="field"> <div class="field">
<input id="forwardSecrecySetting" type="checkbox" <input id="forwardSecrecySetting" type="checkbox"
class="switch is-rounded is-danger" checked> class="switch is-rounded is-danger">
<label for="forwardSecrecySetting"></label> <label for="forwardSecrecySetting"></label>
</div> </div>
</div> </div>
@ -244,7 +244,7 @@
</div> </div>
<form method="post" action="" id="sendForm" enctype="application/x-www-form-urlencoded"> <form method="post" action="" id="sendForm" enctype="application/x-www-form-urlencoded">
<div class="field"> <div class="field">
To: <input id="draftID" type="text" name="to" placeholder="pubkey or select above" required> To: <input id="draftID" type="text" name="to" placeholder="pubkey or select above" autocomplete="off" required>
</div> </div>
Subject: <input name="subject" id="draftSubject" maxlength="25" type="text" Subject: <input name="subject" id="draftSubject" maxlength="25" type="text"
placeholder="message subject" autocomplete="off"> placeholder="message subject" autocomplete="off">

View File

@ -1 +1 @@
1603378318 1603867091