feat: sanitize filesystem paths across UI, API, and service logs - #60
Merged
Conversation
feat: add update instance mod loading controls fix: resolve rellative instance profile
fix: relative pathing & incorrect instanceID access
- Integrated IOutputSanitizer across various components to sanitize error messages and paths, enhancing security and readability. - Removed command line preview functionality from GeneralTab.razor. - Updated Snackbar error messages in ServerEdit.razor, Servers.razor, Settings.razor, and other components to use sanitized exceptions. - Refactored logging in ActivityEventLoggerProvider and KastLoggerProvider to utilize OutputSanitizer for consistent log message formatting. - Added OutputSanitizerTests to ensure proper sanitization of paths and error messages. - Updated tests across multiple services and components to include OutputSanitizer, ensuring consistent behavior in error handling.
…r mods virtual path
…tall and StartModInstall methods
… pre-release with detailed notes
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a centralized output/path sanitization layer to prevent absolute filesystem paths and sensitive host details from leaking into UI messages, API responses, install/mod logs, telemetry, and runtime exceptions. It applies the sanitizer consistently across core infrastructure and Razor pages, adds guardrail tests for markup usage, and updates nightly release publishing so repeated develop pushes no longer fail when the nightly tag/release already exists.
Type of Change
What Changed
Testing
New/expanded test coverage includes:
Checklist
If you want, I can also provide a shorter version optimized for reviewer scanning (1-paragraph summary + 6 bullets max).