Skip to content

Conversation

@mikasa-code
Copy link
Contributor

Summary

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring

Related Issue

Changes

Testing

  • Existing tests pass
  • New tests added (if applicable)
  • Manual testing completed

Screenshots (if applicable)

Checklist

  • Code follows project coding standards
  • Self-review completed
  • Documentation updated (if needed)
  • Breaking changes documented

7bs2 and others added 24 commits October 28, 2025 09:08
* Fix security issue: prevent unauthorized file access
- Removed unused `tts-api-url` and `clone-api-url` from application.yml
- Removed `cloneApiUrl` property from CustomSpeakerServiceImpl
- Inlined `CLONE_API_URL` constant in CustomSpeakerServiceImpl
- Removed `ttsApiUrl` property from VoiceServiceImpl
- Inlined `TTS_API_URL` constant in VoiceServiceImpl- Removed unused RtaUtil class entirely
- Renamed ModelManufacturerEnum to SpeakerTypeEnum
- Changed field name from modelManufacturer to speakerType- Updated enum value from XFYUN to NORMAL- Modified database column name from model_manufacturer to speaker_type
- Adjusted query wrapper to use new speakerType field and enum
- Insert new permissions for speaker training endpoints
- Update pronunciation person configurations with new speaker types
- Remove outdated pronunciation person entries
- Add new pronunciation persons with flow and oral speaker types- Modify column structure to include speaker_type in pronunciation config
- Add speaker name internationalization configuration
- Update database speaker names to use i18n keys
- Create speaker_en.properties and speaker_zh.properties files- Modify VoiceServiceImpl to convert i18n keys to localized names- Adjust InternationalConfig to include speaker resource bundle- Add i18n utility dependency in VoiceServiceImpl- Reorganize import statements in InternationalConfig
…figuration class

- Removed related bean definition for RtasrClient- Cleaned up associated properties injection
- Eliminated legacy rtasr client setup logic
log.error("create task failed", e);
throw e;
} finally {
if (tempFile.exists() && !tempFile.delete()) {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
This path depends on a
user-provided value
.
log.error("create task failed", e);
throw e;
} finally {
if (tempFile.exists() && !tempFile.delete()) {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
This path depends on a
user-provided value
.
- Implemented sanitizeFilename method to prevent path traversal attacks
- Extracted filename part from user input to avoid directory traversal- Removed dangerous characters from filenames (keeping only safe characters)
- Added validation for empty or dot-only filenames
- Limited filename length to prevent overly long names
- Updated temp file creation to use sanitized filenames- Added documentation for the new sanitization method
@mikasa-code mikasa-code reopened this Oct 31, 2025
…rt safely to avoid path traversal attacks

- Handle null filename case when getFileName() returns null- Remove dangerous characters from filename using regex replacement
@mikasa-code mikasa-code closed this Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants