Browse Source

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

tags/release-00
gashapwn 3 years ago
parent
commit
da3a6cefd5
3 changed files with 7 additions and 1 deletions
  1. +1
    -0
      .gitignore
  2. +5
    -0
      app.py
  3. +1
    -1
      lyadmin.conf.json

+ 1
- 0
.gitignore View File

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

+ 5
- 0
app.py View File

@@ -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 View File

@@ -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…
Cancel
Save