added some more readmes

This commit is contained in:
Kevin Froman 2019-08-07 17:46:57 -05:00
parent 636cf3a8d1
commit 76356d5e3f
6 changed files with 37 additions and 8 deletions

View file

@ -0,0 +1,9 @@
# API Servers
Contains the WSGI servers Onionr uses for remote peer communication and local daemon control
## Files
* \_\_init\_\_.py: Exposes the server classes
* private: Contains the client API (the server used to interact with the local Onionr daemon, and view the web UI)
* public: Contains the public API (the server used by remote peers to talk to our daemon)

View file

@ -0,0 +1,8 @@
# Private API Server
Private API server, used to access the web interface locally and control Onionr
## Files
* \_\_init\_\_.py: Sets up the server and a few misc functions
* register_private_blueprints.py: Adds in flask blueprints for various sub-APIs

View file

@ -72,7 +72,7 @@ class PrivateAPI:
'''
Validate that the client token matches the given token. Used to prevent CSRF and data exfiltration
'''
if len(self.clientToken) == 0:
if not self.clientToken:
logger.error("client password needs to be set")
return False
try: