mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
* Validate id types in LinkedFiles getSourceProject Require source_project_id and v1_source_doc_id to be primitives before querying Mongo, rejecting anything else with BadDataError. * Validate refreshLinkedFile request params and body Route refreshLinkedFile through parseReq with a schema requiring project_id and file_id to be ObjectIds and typing the request body. * Use well-formed ObjectIds in LinkedFilesController tests Give the shared test setup valid ObjectId project_id/parent_folder_id so parseReq passes and the controller logic is actually exercised, and fail the tests if next is called unexpectedly. * Use ObjectId file ids in v1 linked-file acceptance fixtures The refresh route now validates file_id as an ObjectId, so the v1 not-imported fixtures need well-formed ids to reach the refuse-to-refresh path (409) instead of failing id validation (404). GitOrigin-RevId: d78b3664e825c6bb25ab2e363e5094b9212db307