From d41f86a27a1939b5896dcaaf0550779bde20a7bd Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 22 Apr 2018 21:10:09 -0500 Subject: [PATCH] what --- onionr/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onionr/api.py b/onionr/api.py index 0f83a4de..1603f995 100755 --- a/onionr/api.py +++ b/onionr/api.py @@ -196,7 +196,9 @@ class API: resp = Response('') # setData should be something the communicator initiates, not this api elif action == 'getData': - resp = base64.b64encode(self._core.getData(data)) + if self._utils.validateHash(data): + if not os.path.exists('data/blocks/' + data + '.db'): + resp = base64.b64encode(self._core.getData(data)) if resp == False: abort(404) resp = ""