get client without auth

This commit is contained in:
2018-09-20 20:58:08 +03:00
parent 7834fb442d
commit 5c0a275a12
2 changed files with 61 additions and 18 deletions

View File

@@ -14,7 +14,7 @@ from utils.utils import *
from utils.crypt import *
__FLEES_VERSION__ = "20180919.0"
__FLEES_VERSION__ = "20180920.0"
app = Flask(__name__)
app.config.from_object(__name__)
config_values = read_config(app)
@@ -550,15 +550,13 @@ def download_zip(name, token = None):
)
@app.route('/script/client', methods=['GET'])
@app.route('/script/client/<name>/<token>', methods=['GET'])
def script_client(name = None, token = None):
(ok,share) = get_share(name, token = token)
if not ok:
notify({
"share": name,
"operation": "unauthorized_script_client"
})
return share
def script_client(name = "", token = ""):
notify({
'share': name,
'operation': 'script_client'
})
return render_template(
"client.py",
name = name,
@@ -566,6 +564,7 @@ def script_client(name = None, token = None):
rooturl = request.url_root
)
@app.route('/script/flip/<name>/<token>', methods=['GET'])
@app.route('/script/flip', methods=['GET'])
def script_flip(name = "", token = ""):