fix(api): 服务器显示名称限 64 个可见字符,拒绝换行、控制符和不可见格式符
This commit is contained in:
19 files changed
+197
-20
No files matched your search
@@ -444,6 +444,12 @@ describe("api access-control wire shapes", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("says what a display name may hold when the server refuses one", () => {
|
||||
expect(humanizeError({ status: 400, code: "bad_display_name" })).toBe(
|
||||
"That display name is invalid — use at most 64 characters, all visible ones or spaces, with no line breaks, tabs or invisible control characters.",
|
||||
);
|
||||
});
|
||||
|
||||
it("says email codes are off when the install has no mail relay", async () => {
|
||||
const { humanizeError } = await import("./api");
|
||||
expect(humanizeError({ status: 503, code: "mail_unavailable" })).toBe(
|
||||
|
||||
Reference in new issue
Block a user