Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ thiserror = "2.0.12"
moka = { version = "0.12.13", features = ["future"] }
utoipa = { version = "5.4.0", features = ["actix_extras", "chrono", "uuid"] }
utoipa-swagger-ui = { version = "9.0.2", features = ["actix-web"] }
validator = { version = "0.20.0", features = ["derive"] }
4 changes: 2 additions & 2 deletions src/endpoints/developers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ pub async fn update_profile(
));
}

if json.display_name.len() < 2 {
if json.display_name.len() < 2 || json.display_name.len() > 64 {
return Err(ApiError::BadRequest(
"Display name must have more than 1 character".into(),
"Display name must be between 2 and 64 characters".into(),
));
}

Expand Down
4 changes: 3 additions & 1 deletion src/mod_zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use image::codecs::png::PngDecoder;
use image::codecs::png::PngEncoder;
use image::{DynamicImage, GenericImageView};
use image::{ImageEncoder, ImageError};
use zip::ZipArchive;
use zip::read::ZipFile;
use zip::result::ZipError;
use zip::ZipArchive;

#[derive(thiserror::Error, Debug)]
pub enum ModZipError {
Expand All @@ -28,6 +28,8 @@ pub enum ModZipError {
ModFileFetchError(#[from] reqwest::Error),
#[error(".geode file is too large ({0} MB), maximum is {1} MB")]
ModFileTooLarge(u64, u64),
#[error(".geode file is too large after uncompression ({0} MB), maximum is {1} MB")]
ModFileTooLargeUncompressed(u64, u64),
#[error("Invalid mod.json: {0}")]
InvalidModJson(String),
#[error("Invalid binaries: {0}")]
Expand Down
Loading
Loading