Skip to content

Commit 53c1fae

Browse files
author
Shamal Faily
committed
Working
1 parent 04f1bee commit 53c1fae

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

dockerLaTeX/LaTeXApi.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,12 @@
77

88
@app.route('/latexApi', methods=['POST'])
99
def index():
10-
allowedCommands = set(['docbook2html','docbook2rtf','dblatex','pandoc'])
1110
try:
1211
dockBookCmd = request.values.get('docBookCmd')
13-
if not docBookCmd:
14-
print("No DocBook command")
15-
abort(400)
16-
cmd = docBookCmd.split(' ')[0]
17-
if (docBookCmd.split(' ')[0] not in allowedCommands):
18-
print(cmd + " is not allowed.")
19-
abort(400)
2012
os.system(dockBookCmd)
2113
return "Success"
2214
except Exception:
2315
abort(500)
2416

2517
if __name__ == '__main__':
26-
app.run(host="0.0.0.0",debug=True)
18+
app.run(host="0.0.0.0")

0 commit comments

Comments
 (0)