parent
4de0b65d6d
commit
3386c6f6b5
@ -0,0 +1,28 @@
|
||||
commit a7f1e81e6ac23fe4b6fd86023681e2975703078d
|
||||
Author: Andy Lutomirski <luto@amacapital.net>
|
||||
Date: Mon Aug 11 18:18:21 2014 -0700
|
||||
|
||||
webconfig: Convert authkey to hex correctly
|
||||
|
||||
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py
|
||||
index 5c7d2b9..43d2ced 100755
|
||||
--- a/share/tools/web_config/webconfig.py
|
||||
+++ b/share/tools/web_config/webconfig.py
|
||||
@@ -17,7 +17,7 @@ else:
|
||||
from urllib.parse import parse_qs
|
||||
import webbrowser
|
||||
import subprocess
|
||||
-import re, socket, os, sys, cgi, select, time, glob, random, string
|
||||
+import re, socket, os, sys, cgi, select, time, glob, random, string, binascii
|
||||
try:
|
||||
import json
|
||||
except ImportError:
|
||||
@@ -654,7 +654,7 @@ where = os.path.dirname(sys.argv[0])
|
||||
os.chdir(where)
|
||||
|
||||
# Generate a 16-byte random key as a hexadecimal string
|
||||
-authkey = hex(os.urandom(16))[2:]
|
||||
+authkey = binascii.b2a_hex(os.urandom(16))
|
||||
|
||||
# Try to find a suitable port
|
||||
PORT = 8000
|
Loading…
Reference in new issue