소스 검색

fix(commands): validate name encoding for non-Latin characters (#11965)

tags/0.14.2
Benjamin 10 달 전
부모
커밋
d9875fe232
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      api/commands.py

+ 2
- 1
api/commands.py 파일 보기

@@ -555,7 +555,8 @@ def create_tenant(email: str, language: Optional[str] = None, name: Optional[str
if language not in languages:
language = "en-US"

name = name.strip()
# Validates name encoding for non-Latin characters.
name = name.strip().encode("utf-8").decode("utf-8") if name else None

# generate random password
new_password = secrets.token_urlsafe(16)

Loading…
취소
저장