mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2177] [MERGED] Validate persona import image bytes #5456
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5456
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2177
Author: @Promansis
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @Promansis
Base:
refactor← Head:fix/issue-2173-verify-persona-image-bytes📝 Commits (3)
c412486Validate persona import image bytesbe3fd78Allow SVG media file copies5c0fcb3Use valid avatar bytes in duplicate test📊 Changes
8 files changed (+204 additions, -55 deletions)
View changed files
📝
src-tauri/src/commands/storage/avatars.rs(+1 -1)📝
src-tauri/src/commands/storage/characters.rs(+9 -3)📝
src-tauri/src/commands/storage/imports/bulk_imports.rs(+26 -7)📝
src-tauri/src/commands/storage/imports/marinara_assets.rs(+3 -1)📝
src-tauri/src/commands/storage/imports/marinara_tests.rs(+7 -14)📝
src-tauri/src/commands/storage/imports/service_tests.rs(+11 -3)📝
src-tauri/src/commands/storage/media_uploads.rs(+135 -1)📝
src-tauri/src/commands/storage/sprites.rs(+12 -25)📄 Description
Linked issue
Closes #2173
Why this change
What changed
Refactor impact
Primary owner:
Tauri/Rust storage, imports, and catalog media assets.
Impact areas reviewed:
media_uploads.rsBoundary notes:
Rust storage/import boundary only. No React UI, engine, shared API wrapper, or remote runtime routing changes.
Pressure points touched:
Import modules and managed media helpers only; no
src-tauri/src/lib.rscommand registration changes.Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
cargo check --manifest-path src-tauri/Cargo.tomlcargo test --manifest-path src-tauri/Cargo.toml decode_image_payload_rejects_declared_image_with_non_image_bytescargo test --manifest-path src-tauri/Cargo.toml persist_image_file_copy_rejects_extension_with_non_image_bytescargo test --manifest-path src-tauri/Cargo.toml native_marinara_character_import_skips_malformed_optional_spritecargo test --manifest-path src-tauri/Cargo.toml bulk_upload_reports_partial_failures_and_returns_refreshed_listcargo test --manifest-path src-tauri/Cargo.toml import_st_character_rolls_back_character_and_avatar_when_embedded_lorebook_failscargo test --manifest-path src-tauri/Cargo.toml import_persona_avatar_file_rolls_back_avatar_when_persona_write_failsFeature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Bugfix for existing persona/image import validation behavior.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
N/A - Rust storage/import validation only.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.