2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-17 21:25:37 +00:00

finally! abolishing private key property

This commit is contained in:
quadrismegistus 2020-09-07 14:34:29 +01:00
parent f541c48f71
commit 36eda13feb

View File

@ -7,11 +7,12 @@ from komrade.backend import *
from flask import Flask, request, jsonify
from flask_classful import FlaskView
# PATH_OPERATOR_WEB_KEYS_URI = hashish(b'keys')
PATH_OPERATOR_WEB_KEYS_FILE = f'/home/ryan/www/website-komrade/.builtin.keys'
PATH_OPERATOR_WEB_KEYS_URL = f'http://{KOMRADE_ONION}/op/.builtin.keys/'
# print(PATH_OPERATOR_WEB_KEYS_URL)
PATH_OPERATOR_WEB_KEYS_URI = hashish(b'keys')
PATH_OPERATOR_WEB_KEYS_FILE = f'/home/ryan/www/website-komrade/.{PATH_OPERATOR_WEB_KEYS_URI}'
PATH_OPERATOR_WEB_KEYS_URL = f'http://{KOMRADE_ONION}/op/{PATH_OPERATOR_WEB_KEYS_URI}/'
print(PATH_OPERATOR_WEB_KEYS_URL)
OPERATOR = None
TELEPHONE = None
@ -24,7 +25,7 @@ class TheSwitchboard(FlaskView, Logger):
@route('/.builtin.keys/')
def keys(self):
if not os.path.exists(PATH_OPERATOR_WEB_KEYS_FILE):
self.log('no keys file exists!')
self.log('no keys file exists!',PATH_OPERATOR_WEB_KEYS_FILE)
return OPERATOR_INTERCEPT_MESSAGE
with open(PATH_OPERATOR_WEB_KEYS_FILE,'rb') as f:
return f.read()