fix(maven): return escaped summary for project description (#5839)

* fix(maven): return escaped summary for project description

* build: add quickxml to labrinth

* fix(maven): use quickxml to escape xml special chars
This commit is contained in:
Sychic
2026-04-19 10:58:32 -04:00
committed by GitHub
parent 281bf066de
commit d1b122fb21
3 changed files with 4 additions and 1 deletions

View File

@@ -80,6 +80,7 @@ murmur2 = { workspace = true }
paste = { workspace = true }
path-util = { workspace = true }
prometheus = { workspace = true }
quick-xml = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }
redis = { workspace = true, features = ["ahash", "r2d2", "tokio-comp"] }

View File

@@ -13,6 +13,7 @@ use crate::queue::session::AuthQueue;
use crate::routes::ApiError;
use crate::{auth::get_user_from_headers, database};
use actix_web::{HttpRequest, HttpResponse, get, route, web};
use quick_xml::escape::escape;
use std::collections::HashSet;
use yaserde::YaSerialize;
@@ -329,7 +330,7 @@ pub async fn version_file(
artifact_id: project_id,
version: vnum,
name: project.inner.name,
description: project.inner.description,
description: escape(project.inner.summary).into_owned(),
};
return Ok(HttpResponse::Ok()
.content_type("text/xml")