瀏覽代碼

server now listens on localhost. added xff ao app.py. ignore notes.txt

tags/release-00
gashapwn 3 年之前
父節點
當前提交
da3a6cefd5
共有 3 個文件被更改,包括 7 次插入1 次删除
  1. +1
    -0
      .gitignore
  2. +5
    -0
      app.py
  3. +1
    -1
      lyadmin.conf.json

+ 1
- 0
.gitignore 查看文件

@@ -6,3 +6,4 @@ test_*.txt
*/p1.pl
*/p2.pl
user_list.txt
notes.txt

+ 5
- 0
app.py 查看文件

@@ -142,6 +142,7 @@ def signup():
pub_key = request.form["pub_key"].strip()
shell = request.form["shell"].strip()
rule_read = request.form["rule_read"].strip()
xff_header = request.headers["X-Forwarded-For"]

is_email_user = False;

@@ -191,6 +192,9 @@ def signup():
print("key failed lib validation")
return handle_invalid_data(request)

if(len(xff_header) < 1):
xff_header = "NO_XFF"
# All users requests have a sequential ID
# The below picks the next ID based on
# how many requests we already have saved
@@ -215,6 +219,7 @@ def signup():
ident_file.write(str(email) + "\n")
ident_file.write(str(shell) + "\n")
ident_file.write(str(pub_key) + "\n")
ident_file.write(str(xff_header) + "\n")
return render_template("signup.html", is_email_user = is_email_user)



+ 1
- 1
lyadmin.conf.json 查看文件

@@ -1,6 +1,6 @@
{
"site_name": "lingy.in",
"listen_ip": "104.248.118.130",
"listen_ip": "127.0.0.1",
"shell": {
"SHELL_BASH": "/usr/local/bin/bash",
"SHELL_KSH": "/bin/ksh"


Loading…
取消
儲存