mirror of
https://github.com/chubin/cheat.sh.git
synced 2026-06-20 13:16:44 +02:00
decode utf-8 before logging
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ def send_malformed():
|
||||
def log_query(ip, found, topic, user_agent):
|
||||
log_entry = "%s %s %s %s" % (ip, found, topic, user_agent)
|
||||
with open(FILE_QUERIES_LOG, 'a') as my_file:
|
||||
my_file.write(log_entry+"\n")
|
||||
my_file.write(log_entry.encode('utf-8')+"\n")
|
||||
|
||||
@app.route("/", methods=['GET', 'POST'])
|
||||
@app.route("/<path:topic>", methods=["GET", "POST"])
|
||||
|
||||
Reference in New Issue
Block a user