mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-05 13:28:08 +03:00
Fix potential crash in POST /api/v1/import/orphans if request was made without self-key permissions.
This commit is contained in:
@@ -162,7 +162,7 @@ router.post(
|
||||
* @name POST /api/v1/import/orphans
|
||||
*/
|
||||
router.post("/orphans", RequirePermissions("submit_score"), async (req, res) => {
|
||||
const userDoc = await GetUserWithIDGuaranteed(req.session.tachi!.user.id);
|
||||
const userDoc = await GetUserWithIDGuaranteed(req[SYMBOL_TachiAPIAuth].userID!);
|
||||
|
||||
logger.info(`User ${FormatUserDoc(userDoc)} forced an orphan sync.`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user