fix(M02): 재검증 흠 넷 — 같은 이름 토스트 · 쓸 수 없는 글자 막기(화면·서버 400) · 저장 안 한 고침 버리기 확인 · 덮어쓰기 확인과 개인·회사 지우기 단추
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148XFUpPfpiuTjxF1EK9c95
This commit is contained in:
@@ -18,7 +18,7 @@ from common_util.common_util_json import atomic_write_json
|
||||
|
||||
FOLDER: Path = Path(__file__).resolve().parent.parent / "resources" / "master_template"
|
||||
KINDS = ("table", "drawing") # 시험은 FOLDER 를 사본으로 바꿈
|
||||
_BAD_NAME = re.compile(r'[\/:*?"<>|\x00-\x1f]')
|
||||
_BAD_NAME = re.compile(r'[\\/:*?"<>|\x00-\x1f]|\.\.')
|
||||
# ponytail: 저장은 한 번에 하나(프로세스 안 잠금) · 서버를 여럿 띄우면 파일 잠금으로
|
||||
_LOCK = threading.Lock()
|
||||
|
||||
@@ -37,7 +37,7 @@ def _path(kind: str, name: str) -> Path:
|
||||
if kind not in KINDS:
|
||||
raise StoreError(404, f"없는 종류 「{kind}」")
|
||||
if not name or name != name.strip() or name.startswith(".") or _BAD_NAME.search(name):
|
||||
raise StoreError(422, f"쓸 수 없는 이름 「{name}」")
|
||||
raise StoreError(400, f"쓸 수 없는 글자가 있는 이름 「{name}」")
|
||||
return FOLDER / kind / f"{name}.json"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user