Add moderator bots and editable MineGeo usernames
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 3m27s
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 3m27s
This commit is contained in:
@@ -6,7 +6,16 @@ import {
|
||||
displayNameSchema,
|
||||
newPasswordSchema,
|
||||
profileUpdateSchema,
|
||||
usernameSchema,
|
||||
} from "../shared/account";
|
||||
test("usernames are normalized, unique-key compatible and changeable through profile updates", () => {
|
||||
assert.equal(usernameSchema.parse(" Perfect_Python500 "), "perfect_python500");
|
||||
assert.deepEqual(profileUpdateSchema.parse({ username: "New_Name" }), { username: "new_name" });
|
||||
for (const bad of ["ab", "a".repeat(33), "name space", "name@server", "юзер", "a\nb"]) assert.equal(usernameSchema.safeParse(bad).success, false);
|
||||
const path = "/moderator-application/" + "a".repeat(64);
|
||||
assert.equal(authDestination(path), path);
|
||||
assert.equal(authDestination(path + "?next=https://evil.example"), "/dashboard");
|
||||
});
|
||||
import {
|
||||
createRecoveryGrant,
|
||||
verifyRecoveryGrant,
|
||||
|
||||
Reference in New Issue
Block a user