From 94f3448e52e8fb2f2833be2e945a43017a8a6db0 Mon Sep 17 00:00:00 2001 From: Blodhgarm Date: Fri, 28 Aug 2026 02:08:32 -0500 Subject: [PATCH 1/5] feat: add ability to report organizations --- .../20260828065709_reports-organization.sql | 2 ++ .../src/database/models/report_item.rs | 10 ++++--- apps/labrinth/src/models/v3/reports.rs | 9 ++++++- apps/labrinth/src/routes/v3/reports.rs | 26 ++++++++++++++++++- 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 apps/labrinth/migrations/20260828065709_reports-organization.sql diff --git a/apps/labrinth/migrations/20260828065709_reports-organization.sql b/apps/labrinth/migrations/20260828065709_reports-organization.sql new file mode 100644 index 0000000000..1e271b2aec --- /dev/null +++ b/apps/labrinth/migrations/20260828065709_reports-organization.sql @@ -0,0 +1,2 @@ +ALTER TABLE reports + ADD COLUMN organization_id bigint diff --git a/apps/labrinth/src/database/models/report_item.rs b/apps/labrinth/src/database/models/report_item.rs index cf7edea740..6e748d89f2 100644 --- a/apps/labrinth/src/database/models/report_item.rs +++ b/apps/labrinth/src/database/models/report_item.rs @@ -9,6 +9,7 @@ pub struct DBReport { pub project_id: Option, pub version_id: Option, pub user_id: Option, + pub organization_id: Option, pub shared_instance_id: Option, pub shared_instance_version_id: Option, pub body: String, @@ -23,6 +24,7 @@ pub struct ReportQueryResult { pub project_id: Option, pub version_id: Option, pub user_id: Option, + pub organization_id: Option, pub shared_instance_id: Option, pub shared_instance_version_id: Option, pub body: String, @@ -40,12 +42,12 @@ impl DBReport { sqlx::query!( " INSERT INTO reports ( - id, report_type_id, mod_id, version_id, user_id, + id, report_type_id, mod_id, version_id, user_id, organization_id, shared_instance_id, shared_instance_version_id, body, reporter ) VALUES ( $1, $2, $3, $4, $5, - $6, $7, $8, $9 + $6, $7, $8, $9, $10 ) ", self.id as DBReportId, @@ -53,6 +55,7 @@ impl DBReport { self.project_id.map(|x| x.0 as i64), self.version_id.map(|x| x.0 as i64), self.user_id.map(|x| x.0 as i64), + self.organization_id.map(|x| x.0 as i64), self.shared_instance_id.map(|x| x.0 as i64), self.shared_instance_version_id, self.body, @@ -89,7 +92,7 @@ impl DBReport { report_ids.iter().map(|x| x.0).collect(); let reports = sqlx::query!( " - SELECT r.id, rt.name, r.mod_id, r.version_id, r.user_id, r.shared_instance_id, r.shared_instance_version_id, r.body, r.reporter, r.created, t.id thread_id, r.closed + SELECT r.id, rt.name, r.mod_id, r.version_id, r.user_id, r.organization_id, r.shared_instance_id, r.shared_instance_version_id, r.body, r.reporter, r.created, t.id thread_id, r.closed FROM reports r INNER JOIN report_types rt ON rt.id = r.report_type_id INNER JOIN threads t ON t.report_id = r.id @@ -105,6 +108,7 @@ impl DBReport { project_id: x.mod_id.map(DBProjectId), version_id: x.version_id.map(DBVersionId), user_id: x.user_id.map(DBUserId), + organization_id: x.organization_id.map(DBOrganizationId), shared_instance_id: x.shared_instance_id.map(SharedInstanceId), shared_instance_version_id: x.shared_instance_version_id, body: x.body, diff --git a/apps/labrinth/src/models/v3/reports.rs b/apps/labrinth/src/models/v3/reports.rs index 34beeb3f96..41b2fcfb8f 100644 --- a/apps/labrinth/src/models/v3/reports.rs +++ b/apps/labrinth/src/models/v3/reports.rs @@ -1,5 +1,7 @@ use crate::database::models::report_item::ReportQueryResult as DBReport; -use crate::models::ids::{ProjectId, ReportId, ThreadId, VersionId}; +use crate::models::ids::{ + OrganizationId, ProjectId, ReportId, ThreadId, VersionId, +}; use ariadne::ids::UserId; use ariadne::ids::base62_impl::to_base62; use chrono::{DateTime, Utc}; @@ -26,6 +28,7 @@ pub enum ItemType { Project, Version, User, + Organization, SharedInstance, Unknown, } @@ -36,6 +39,7 @@ impl ItemType { ItemType::Project => "project", ItemType::Version => "version", ItemType::User => "user", + ItemType::Organization => "organization", ItemType::SharedInstance => "shared-instance", ItemType::Unknown => "unknown", } @@ -57,6 +61,9 @@ impl From for Report { } else if let Some(user_id) = x.user_id { item_id = UserId::from(user_id).to_string(); item_type = ItemType::User; + } else if let Some(organization_id) = x.organization_id { + item_id = OrganizationId::from(organization_id).to_string(); + item_type = ItemType::Organization; } else if let Some(shared_instance_id) = x.shared_instance_id { item_id = to_base62(shared_instance_id.0 as u64); item_type = ItemType::SharedInstance; diff --git a/apps/labrinth/src/routes/v3/reports.rs b/apps/labrinth/src/routes/v3/reports.rs index a3bba51279..f686d463e7 100644 --- a/apps/labrinth/src/routes/v3/reports.rs +++ b/apps/labrinth/src/routes/v3/reports.rs @@ -8,7 +8,7 @@ use crate::database::models::thread_item::{ ThreadBuilder, ThreadMessageBuilder, }; use crate::env::ENV; -use crate::models::ids::ImageId; +use crate::models::ids::{ImageId, OrganizationId}; use crate::models::ids::{ProjectId, VersionId}; use crate::models::images::{Image, ImageContext}; use crate::models::notifications::NotificationBody; @@ -113,6 +113,7 @@ pub async fn report_create( project_id: None, version_id: None, user_id: None, + organization_id: None, shared_instance_id: None, shared_instance_version_id: None, body: new_report.body.clone(), @@ -191,6 +192,29 @@ pub async fn report_create( report.user_id = Some(user_id.into()) } + ItemType::Organization => { + let organization_id = OrganizationId( + parse_base62(new_report.item_id.as_str()) + .wrap_request_err("parsing reported organization ID")?, + ); + + let result = sqlx::query!( + "SELECT EXISTS(SELECT 1 FROM organizations WHERE id = $1)", + organization_id.0 as i64 + ) + .fetch_one(&mut transaction) + .await + .wrap_internal_err("querying database for `report_create`")?; + + if !result.exists.unwrap_or(false) { + return Err(ApiError::Request(eyre::eyre!(format!( + "Organization could not be found: {}", + new_report.item_id + )))); + } + + report.organization_id = Some(organization_id.into()) + } ItemType::SharedInstance => { // parsing let (instance_part, version_part) = new_report From 20604a03027250779584805c517c0481022df1fc Mon Sep 17 00:00:00 2001 From: sychic <47618543+Sychic@users.noreply.github.com> Date: Fri, 28 Aug 2026 15:37:57 -0400 Subject: [PATCH 2/5] fix(labrinth): missing report case --- apps/labrinth/src/models/v2/reports.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/labrinth/src/models/v2/reports.rs b/apps/labrinth/src/models/v2/reports.rs index 0f65679d90..f119430ec0 100644 --- a/apps/labrinth/src/models/v2/reports.rs +++ b/apps/labrinth/src/models/v2/reports.rs @@ -32,6 +32,7 @@ impl From for LegacyItemType { ItemType::Version => LegacyItemType::Version, ItemType::User => LegacyItemType::User, ItemType::SharedInstance => LegacyItemType::Unknown, + ItemType::Organization => LegacyItemType::Unknown, ItemType::Unknown => LegacyItemType::Unknown, } } From 89fe6fa3948ef37eaed4250b7af4e9ddad08a3ca Mon Sep 17 00:00:00 2001 From: sychic <47618543+Sychic@users.noreply.github.com> Date: Fri, 28 Aug 2026 15:38:07 -0400 Subject: [PATCH 3/5] chore(labrinth): sqlx prepare --- ...ec4ea94470b3734e1d82a05d6e3f47d58e77d.json | 22 +++++++ ...a136ddbe802cd3a4c649e4982d9f28ae097ed.json | 34 ----------- ...5705f8efc09ac21e0cf9a15c4cce019aaeb05.json | 23 -------- ...7da1a33a059b0a1d00b51e27b4a5399492b13.json | 15 ----- ...a0b819aa1ee54f121d2c47903d44fc871e45e.json | 22 ------- ...438b973e942accd11608280f4247e3252439.json} | 22 ++++--- ...04f69a6d12ff29e21a15f8fdd73386634a3ec.json | 19 ------ ...5a5176583d2781dbb9aa428f8f920844f2a1e.json | 58 ------------------- ...b84c27e03bf7c5048114d03e7add129d2de6f.json | 23 ++++++++ 9 files changed, 59 insertions(+), 179 deletions(-) create mode 100644 apps/labrinth/.sqlx/query-2d80817cd1d196c7b3e49cf22e0ec4ea94470b3734e1d82a05d6e3f47d58e77d.json delete mode 100644 apps/labrinth/.sqlx/query-4ccad9e07ae61ba87b1784b6ee9a136ddbe802cd3a4c649e4982d9f28ae097ed.json delete mode 100644 apps/labrinth/.sqlx/query-87d4778e52ac3e9fd885f9c77595705f8efc09ac21e0cf9a15c4cce019aaeb05.json delete mode 100644 apps/labrinth/.sqlx/query-9eea063cb153da407548f957cef7da1a33a059b0a1d00b51e27b4a5399492b13.json delete mode 100644 apps/labrinth/.sqlx/query-d03688d1840db14dc10cc942a8aa0b819aa1ee54f121d2c47903d44fc871e45e.json rename apps/labrinth/.sqlx/{query-de085413113d832b534db925b8bf1e50b852afea1c6e751664cae4fd9e789aab.json => query-d3c3bb0d2fd0ec440fdce1357be5438b973e942accd11608280f4247e3252439.json} (72%) delete mode 100644 apps/labrinth/.sqlx/query-d4b427672138b0c75f123a23ce104f69a6d12ff29e21a15f8fdd73386634a3ec.json delete mode 100644 apps/labrinth/.sqlx/query-dc13b4d8b84681dc4f1ea5f4f735a5176583d2781dbb9aa428f8f920844f2a1e.json create mode 100644 apps/labrinth/.sqlx/query-e460db637bd3b934ba17986f0dbb84c27e03bf7c5048114d03e7add129d2de6f.json diff --git a/apps/labrinth/.sqlx/query-2d80817cd1d196c7b3e49cf22e0ec4ea94470b3734e1d82a05d6e3f47d58e77d.json b/apps/labrinth/.sqlx/query-2d80817cd1d196c7b3e49cf22e0ec4ea94470b3734e1d82a05d6e3f47d58e77d.json new file mode 100644 index 0000000000..046ffcf892 --- /dev/null +++ b/apps/labrinth/.sqlx/query-2d80817cd1d196c7b3e49cf22e0ec4ea94470b3734e1d82a05d6e3f47d58e77d.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT EXISTS(SELECT 1 FROM organizations WHERE id = $1)", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + null + ] + }, + "hash": "2d80817cd1d196c7b3e49cf22e0ec4ea94470b3734e1d82a05d6e3f47d58e77d" +} diff --git a/apps/labrinth/.sqlx/query-4ccad9e07ae61ba87b1784b6ee9a136ddbe802cd3a4c649e4982d9f28ae097ed.json b/apps/labrinth/.sqlx/query-4ccad9e07ae61ba87b1784b6ee9a136ddbe802cd3a4c649e4982d9f28ae097ed.json deleted file mode 100644 index 212faa2dca..0000000000 --- a/apps/labrinth/.sqlx/query-4ccad9e07ae61ba87b1784b6ee9a136ddbe802cd3a4c649e4982d9f28ae097ed.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT project_id, type, metadata\n FROM project_disclosures\n WHERE project_id = ANY($1)\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "project_id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "type", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "metadata", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Int8Array" - ] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "4ccad9e07ae61ba87b1784b6ee9a136ddbe802cd3a4c649e4982d9f28ae097ed" -} diff --git a/apps/labrinth/.sqlx/query-87d4778e52ac3e9fd885f9c77595705f8efc09ac21e0cf9a15c4cce019aaeb05.json b/apps/labrinth/.sqlx/query-87d4778e52ac3e9fd885f9c77595705f8efc09ac21e0cf9a15c4cce019aaeb05.json deleted file mode 100644 index 5d5edc88ae..0000000000 --- a/apps/labrinth/.sqlx/query-87d4778e52ac3e9fd885f9c77595705f8efc09ac21e0cf9a15c4cce019aaeb05.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n\t\t\tSELECT project_id\n\t\t\tFROM project_disclosures\n\t\t\tWHERE type = $1 AND project_id = ANY($2)\n\t\t\t", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "project_id", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text", - "Int8Array" - ] - }, - "nullable": [ - false - ] - }, - "hash": "87d4778e52ac3e9fd885f9c77595705f8efc09ac21e0cf9a15c4cce019aaeb05" -} diff --git a/apps/labrinth/.sqlx/query-9eea063cb153da407548f957cef7da1a33a059b0a1d00b51e27b4a5399492b13.json b/apps/labrinth/.sqlx/query-9eea063cb153da407548f957cef7da1a33a059b0a1d00b51e27b4a5399492b13.json deleted file mode 100644 index e43bc36603..0000000000 --- a/apps/labrinth/.sqlx/query-9eea063cb153da407548f957cef7da1a33a059b0a1d00b51e27b4a5399492b13.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n\t\t\tDELETE FROM project_disclosures\n\t\t\tWHERE project_id = $1 AND type = $2\n\t\t\t", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text" - ] - }, - "nullable": [] - }, - "hash": "9eea063cb153da407548f957cef7da1a33a059b0a1d00b51e27b4a5399492b13" -} diff --git a/apps/labrinth/.sqlx/query-d03688d1840db14dc10cc942a8aa0b819aa1ee54f121d2c47903d44fc871e45e.json b/apps/labrinth/.sqlx/query-d03688d1840db14dc10cc942a8aa0b819aa1ee54f121d2c47903d44fc871e45e.json deleted file mode 100644 index faf079fbac..0000000000 --- a/apps/labrinth/.sqlx/query-d03688d1840db14dc10cc942a8aa0b819aa1ee54f121d2c47903d44fc871e45e.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO reports (\n id, report_type_id, mod_id, version_id, user_id,\n shared_instance_id, shared_instance_version_id, body, reporter\n )\n VALUES (\n $1, $2, $3, $4, $5,\n $6, $7, $8, $9\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Int8", - "Int8", - "Int8", - "Int8", - "Int4", - "Varchar", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "d03688d1840db14dc10cc942a8aa0b819aa1ee54f121d2c47903d44fc871e45e" -} diff --git a/apps/labrinth/.sqlx/query-de085413113d832b534db925b8bf1e50b852afea1c6e751664cae4fd9e789aab.json b/apps/labrinth/.sqlx/query-d3c3bb0d2fd0ec440fdce1357be5438b973e942accd11608280f4247e3252439.json similarity index 72% rename from apps/labrinth/.sqlx/query-de085413113d832b534db925b8bf1e50b852afea1c6e751664cae4fd9e789aab.json rename to apps/labrinth/.sqlx/query-d3c3bb0d2fd0ec440fdce1357be5438b973e942accd11608280f4247e3252439.json index 733676afd6..b16e388494 100644 --- a/apps/labrinth/.sqlx/query-de085413113d832b534db925b8bf1e50b852afea1c6e751664cae4fd9e789aab.json +++ b/apps/labrinth/.sqlx/query-d3c3bb0d2fd0ec440fdce1357be5438b973e942accd11608280f4247e3252439.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT r.id, rt.name, r.mod_id, r.version_id, r.user_id, r.shared_instance_id, r.shared_instance_version_id, r.body, r.reporter, r.created, t.id thread_id, r.closed\n FROM reports r\n INNER JOIN report_types rt ON rt.id = r.report_type_id\n INNER JOIN threads t ON t.report_id = r.id\n WHERE r.id = ANY($1)\n ORDER BY r.created DESC\n ", + "query": "\n SELECT r.id, rt.name, r.mod_id, r.version_id, r.user_id, r.organization_id, r.shared_instance_id, r.shared_instance_version_id, r.body, r.reporter, r.created, t.id thread_id, r.closed\n FROM reports r\n INNER JOIN report_types rt ON rt.id = r.report_type_id\n INNER JOIN threads t ON t.report_id = r.id\n WHERE r.id = ANY($1)\n ORDER BY r.created DESC\n ", "describe": { "columns": [ { @@ -30,36 +30,41 @@ }, { "ordinal": 5, - "name": "shared_instance_id", + "name": "organization_id", "type_info": "Int8" }, { "ordinal": 6, + "name": "shared_instance_id", + "type_info": "Int8" + }, + { + "ordinal": 7, "name": "shared_instance_version_id", "type_info": "Int4" }, { - "ordinal": 7, + "ordinal": 8, "name": "body", "type_info": "Varchar" }, { - "ordinal": 8, + "ordinal": 9, "name": "reporter", "type_info": "Int8" }, { - "ordinal": 9, + "ordinal": 10, "name": "created", "type_info": "Timestamptz" }, { - "ordinal": 10, + "ordinal": 11, "name": "thread_id", "type_info": "Int8" }, { - "ordinal": 11, + "ordinal": 12, "name": "closed", "type_info": "Bool" } @@ -77,6 +82,7 @@ true, true, true, + true, false, false, false, @@ -84,5 +90,5 @@ false ] }, - "hash": "de085413113d832b534db925b8bf1e50b852afea1c6e751664cae4fd9e789aab" + "hash": "d3c3bb0d2fd0ec440fdce1357be5438b973e942accd11608280f4247e3252439" } diff --git a/apps/labrinth/.sqlx/query-d4b427672138b0c75f123a23ce104f69a6d12ff29e21a15f8fdd73386634a3ec.json b/apps/labrinth/.sqlx/query-d4b427672138b0c75f123a23ce104f69a6d12ff29e21a15f8fdd73386634a3ec.json deleted file mode 100644 index a904ea2708..0000000000 --- a/apps/labrinth/.sqlx/query-d4b427672138b0c75f123a23ce104f69a6d12ff29e21a15f8fdd73386634a3ec.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n\t\t\tINSERT INTO project_disclosures (project_id, type, metadata, updated_by, set_by_moderator, lock_status)\n\t\t\tVALUES ($1, $2, $3, $4, $5, $6)\n\t\t\tON CONFLICT (project_id, type) DO UPDATE SET\n\t\t\t\tmetadata = $3,\n\t\t\t\tupdated_at = now(),\n\t\t\t\tupdated_by = $4,\n\t\t\t\tset_by_moderator = $5,\n\t\t\t\tlock_status = $6\n\t\t\t", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Jsonb", - "Int8", - "Bool", - "Text" - ] - }, - "nullable": [] - }, - "hash": "d4b427672138b0c75f123a23ce104f69a6d12ff29e21a15f8fdd73386634a3ec" -} diff --git a/apps/labrinth/.sqlx/query-dc13b4d8b84681dc4f1ea5f4f735a5176583d2781dbb9aa428f8f920844f2a1e.json b/apps/labrinth/.sqlx/query-dc13b4d8b84681dc4f1ea5f4f735a5176583d2781dbb9aa428f8f920844f2a1e.json deleted file mode 100644 index 4004f38b3b..0000000000 --- a/apps/labrinth/.sqlx/query-dc13b4d8b84681dc4f1ea5f4f735a5176583d2781dbb9aa428f8f920844f2a1e.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n\t\t\tSELECT project_id, type AS \"disclosure_type!\", metadata, updated_at, updated_by, set_by_moderator, lock_status\n\t\t\tFROM project_disclosures\n\t\t\tWHERE project_id = $1\n\t\t\tORDER BY updated_at DESC\n\t\t\t", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "project_id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "disclosure_type!", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "metadata", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "updated_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 4, - "name": "updated_by", - "type_info": "Int8" - }, - { - "ordinal": 5, - "name": "set_by_moderator", - "type_info": "Bool" - }, - { - "ordinal": 6, - "name": "lock_status", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false - ] - }, - "hash": "dc13b4d8b84681dc4f1ea5f4f735a5176583d2781dbb9aa428f8f920844f2a1e" -} diff --git a/apps/labrinth/.sqlx/query-e460db637bd3b934ba17986f0dbb84c27e03bf7c5048114d03e7add129d2de6f.json b/apps/labrinth/.sqlx/query-e460db637bd3b934ba17986f0dbb84c27e03bf7c5048114d03e7add129d2de6f.json new file mode 100644 index 0000000000..bbba250318 --- /dev/null +++ b/apps/labrinth/.sqlx/query-e460db637bd3b934ba17986f0dbb84c27e03bf7c5048114d03e7add129d2de6f.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO reports (\n id, report_type_id, mod_id, version_id, user_id, organization_id,\n shared_instance_id, shared_instance_version_id, body, reporter\n )\n VALUES (\n $1, $2, $3, $4, $5,\n $6, $7, $8, $9, $10\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Int8", + "Int8", + "Int8", + "Int8", + "Int8", + "Int4", + "Varchar", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "e460db637bd3b934ba17986f0dbb84c27e03bf7c5048114d03e7add129d2de6f" +} From eeba73e4caa9d8cddd7460ea06c8ea63495bed0a Mon Sep 17 00:00:00 2001 From: Blodhgarm Date: Fri, 28 Aug 2026 15:22:53 -0500 Subject: [PATCH 4/5] fix: bump cmake to fix issues with being unable to build using windows and MSVC from visual studio --- Cargo.lock | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 459048aa57..719fa96c93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1441,7 +1441,7 @@ dependencies = [ "quote", "regex", "rustc-hash", - "shlex", + "shlex 1.3.0", "syn 2.0.106", ] @@ -1879,14 +1879,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.41" +version = "1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" +checksum = "0ad534f4357a5264cce5019c989cf66a4f0dc4e0d1b1d15f8aacec0ff7360273" dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex", + "shlex 2.0.1", ] [[package]] @@ -2132,9 +2132,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.54" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" dependencies = [ "cc", ] @@ -3613,9 +3613,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.4" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" [[package]] name = "findshlibs" @@ -9767,6 +9767,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + [[package]] name = "signal-hook-registry" version = "1.4.6" @@ -11112,7 +11118,7 @@ dependencies = [ "serde_with", "sha1_smol", "sha2", - "shlex", + "shlex 1.3.0", "sqlx", "sysinfo", "tauri", From 2867db6ed91f150eccb853c3ee6b4317d0f8d5cb Mon Sep 17 00:00:00 2001 From: Blodhgarm Date: Sat, 29 Aug 2026 14:34:09 -0500 Subject: [PATCH 5/5] Update apps/labrinth/src/routes/v3/reports.rs Co-authored-by: aecsocket <43144841+aecsocket@users.noreply.github.com> Signed-off-by: Blodhgarm --- apps/labrinth/src/routes/v3/reports.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/labrinth/src/routes/v3/reports.rs b/apps/labrinth/src/routes/v3/reports.rs index f686d463e7..d3ad4136e0 100644 --- a/apps/labrinth/src/routes/v3/reports.rs +++ b/apps/labrinth/src/routes/v3/reports.rs @@ -207,10 +207,10 @@ pub async fn report_create( .wrap_internal_err("querying database for `report_create`")?; if !result.exists.unwrap_or(false) { - return Err(ApiError::Request(eyre::eyre!(format!( + return Err(ApiError::Request(eyre::eyre!( "Organization could not be found: {}", new_report.item_id - )))); + ))); } report.organization_id = Some(organization_id.into())