Browse Source

파일명에 점 빼고 전부 사용 가능하도록

https://github.com/openNAMU/openNAMU/issues/2047
잉여개발기 (SPDV) 2 years ago
parent
commit
e61dc026bb
4 changed files with 5 additions and 5 deletions
  1. 1 1
      lang/en-US.json
  2. 1 1
      lang/ko-KR.json
  3. 2 2
      route/edit_upload.py
  4. 1 1
      version.json

+ 1 - 1
lang/en-US.json

@@ -615,7 +615,7 @@
             "move_error" : "An error occurred while moving. All or part of it has not been moved.",
             "password_diffrent_error" : "Reconfirm password and input password are different.",
             "edit_filter_error" : "Censored by edit filter.",
-            "file_name_error" : "Only English alphabets, Korean alphabets, spaces, underscore, and hyphens are allowed for the file name.",
+            "file_name_error" : "You cannot use dots in the file name.",
             "topic_long_error" : "The discussions topic must not exceed 256 characters.",
             "email_error" : "No one has this email.",
             "regex_error" : "There is an error in the regular expression.",

+ 1 - 1
lang/ko-KR.json

@@ -81,7 +81,7 @@
     "markup_enabled": "문법 사용 가능",
     "send": "전송",
     "not_sure": "확실하지 않음",
-    "file_name_error": "파일명에는 알파벳, 한글, 공백, 밑줄 및 빼기 기호만 사용할 수 있습니다.",
+    "file_name_error": "파일명에는 점을 사용할 수 없습니다.",
     "pass": "넘기기",
     "recaptcha_error": "'로봇이 아닙니다'를 통해 reCAPTCHA를 통과하세요.",
     "file_capacity_error": "최대 파일 크기 (MB) : ",

+ 2 - 2
route/edit_upload.py

@@ -24,7 +24,7 @@ def edit_upload():
             if (file_max * 1000 * 1000 * file_len) < flask.request.content_length:
                 return re_error('/error/17')
 
-            if file_len == 1:    
+            if file_len == 1:
                 file_num = None
             else:
                 if acl_check(None, 'many_upload') == 1:
@@ -49,7 +49,7 @@ def edit_upload():
                     name = data.filename
 
                 piece = os.path.splitext(name)
-                if re.search(r'[^ㄱ-힣0-9a-zA-Z_\- ]', piece[0]):
+                if re.search(r'[^\.]', piece[0]):
                     return re_error('/error/22')
 
                 e_data = sha224_replace(piece[0]) + piece[1]

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.4.6-RC5-dev90",
+        "r_ver" : "v3.4.6-RC5-dev91",
         "c_ver" : "3500374",
         "s_ver" : "3500112"
     }