mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Only allow number IDs to the user handlers
This commit is contained in:
parent
2bc26ef3fd
commit
4c397ff454
@ -49,7 +49,7 @@ def api_handlers(handler_args):
|
||||
handler_args,
|
||||
),
|
||||
(
|
||||
r"/api/v2/users/([a-z0-9_]+)/?",
|
||||
r"/api/v2/users/([0-9]+)/?",
|
||||
ApiUsersUserIndexHandler,
|
||||
handler_args,
|
||||
),
|
||||
@ -59,7 +59,7 @@ def api_handlers(handler_args):
|
||||
handler_args,
|
||||
),
|
||||
(
|
||||
r"/api/v2/users/([a-z0-9_]+)/pfp/?",
|
||||
r"/api/v2/users/([0-9]+)/pfp/?",
|
||||
ApiUsersUserPfpHandler,
|
||||
handler_args,
|
||||
),
|
||||
@ -69,7 +69,7 @@ def api_handlers(handler_args):
|
||||
handler_args,
|
||||
),
|
||||
(
|
||||
r"/api/v2/users/([a-z0-9_]+)/public/?",
|
||||
r"/api/v2/users/([0-9]+)/public/?",
|
||||
ApiUsersUserPublicHandler,
|
||||
handler_args,
|
||||
),
|
||||
|
@ -134,6 +134,7 @@ class ApiUsersIndexHandler(BaseApiHandler):
|
||||
)
|
||||
permissions_mask = "".join(permissions_mask)
|
||||
|
||||
# TODO: do this in the most efficient way
|
||||
user_id = self.controller.users.add_user(
|
||||
username,
|
||||
password,
|
||||
|
Loading…
Reference in New Issue
Block a user