ect (or 2du) 8 anni fa
parent
commit
a646e3d3d2
2 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. 7 2
      func.py
  2. 1 0
      set_mark/start.py

+ 7 - 2
func.py

@@ -272,7 +272,7 @@ def custom(conn):
     else:
         user_icon = 0
 
-    if user_icon == 1:
+    if user_icon != 0:
         curs.execute('select email from user where id = ?', [ip_check()])
         data = curs.fetchall()
         if data:
@@ -282,7 +282,12 @@ def custom(conn):
     else:
         email = ''
 
-    return ['', '', user_icon, user_head, email]
+    if user_icon != 0:
+        user_name = ip_check()
+    else:
+        user_name = ''
+
+    return ['', '', user_icon, user_head, email, user_name]
 
 def acl_check(conn, name):
     curs = conn.cursor()

+ 1 - 0
set_mark/start.py

@@ -123,6 +123,7 @@ def start(conn, data, title):
 
     # XSS 이스케이프
     data = html.escape(data)
+    data = re.sub('&', '&', data)
 
     # 포함 문법 처리
     while 1: