From b29e0f0c09311acc46a1c5e76e88d0410613f242 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 18 Jan 2018 01:49:13 -0600 Subject: [PATCH] fixed host check spelling bug --- onionr/api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/onionr/api.py b/onionr/api.py index ba3c05b5..c9980cae 100755 --- a/onionr/api.py +++ b/onionr/api.py @@ -118,9 +118,15 @@ class API: self.validateHost('public') action = request.args.get('action') requestingPeer = request.args.get('myID') - + data = request.args.get('data') if action == 'firstConnect': pass + elif action == 'ping': + resp = Response("pong!") + elif action == 'setHMAC': + pass + + return resp @app.errorhandler(404) def notfound(err): @@ -154,7 +160,7 @@ class API: if not request.host.startswith('127'): abort(403) elif hostType == 'public': - if not request.host.endswith('onion') and not request.hosst.endswith('i2p'): + if not request.host.endswith('onion') and not request.host.endswith('i2p'): abort(403) # Validate x-requested-with, to protect against CSRF/metadata leaks if not self._developmentMode: