resolve merge conflict ?

This commit is contained in:
gled 2019-07-25 12:12:18 -07:00
parent b78e298450
commit 78e3130bc7

View file

@ -334,13 +334,13 @@ async def inbox(request):
if 'actor' not in data or not request['validated']:
logging.info('Actor not in data or request not validated')
raise aiohttp.web.HTTPUnauthorized(body='access denied', content_type='text/plain')
if instance in AP_CONFIG['blocked_instances'] or instance in DATABASE.get('FAILED_CHECKS',{}):
elif instance in AP_CONFIG['blocked_instances']:
INBOUND_STATS['rejected']+=1
logging.info('Blocked instance')
raise aiohttp.web.HTTPUnauthorized(body='access denied', content_type='text/plain')
if data['type'] != 'Follow' and 'https://{}/inbox'.format(instance) not in DATABASE['relay-list']:
elif data['type'] != 'Follow' and 'https://{}/inbox'.format(instance) not in DATABASE['relay-list']:
logging.info('Datatype not follow or instance not in relay-list: %r',instance)
if data['type'] not in ['Announce','Delete']:
logging.info('data: %r',data)
@ -352,6 +352,10 @@ async def inbox(request):
DATABASE['not-subscribed'] = not_subd
return aiohttp.web.Response(body=b'{}', content_type='application/activity+json')
elif AP_CONFIG['whitelist_enabled'] is True and instance not in AP_CONFIG['whitelist']:
raise aiohttp.web.HTTPUnauthorized(body='access denied', content_type='text/plain')
# let's give a try and remove the instance from backoff if it sends us a message
bi = DATABASE.get('backoff-instances',{})
if instance in bi: