Skip to content

chore: logging improvements#277

Merged
moshloop merged 7 commits into
masterfrom
pr/fix-files
Oct 3, 2025
Merged

chore: logging improvements#277
moshloop merged 7 commits into
masterfrom
pr/fix-files

Conversation

@moshloop

@moshloop moshloop commented Oct 3, 2025

Copy link
Copy Markdown
Member

No description provided.

When using os.OpenRoot with OpenFile, the mode parameter must only contain
permission bits (0777), not the full mode with file type bits. This fixes
the 'unsupported file mode' error when extracting tar archives containing
files with standard Unix permissions.

Changes:
- Extract permission bits using os.ModePerm mask for regular files
- Extract permission bits for hard links
- Ensures compatibility with Go 1.25+ OpenRoot security feature
The $ character is commonly used in Java compiled class files for inner
classes (e.g., OuterClass$InnerClass.class). Blocking this character
prevents extraction of Java-based archives like Apache ActiveMQ.

Changes:
- Removed $ from blacklistedPathSymbols in files.go
- Updated path validation tests to no longer reject $
- Added test cases for Java inner class filenames

The $ character is safe in filenames and doesn't cause path traversal
or other security issues. Shell variable substitution concerns don't
apply to archive extraction paths.

Fixes extraction errors like:
"path ...WebConsoleStarter$OsgiUtil.class contains illegal characters"
@moshloop
moshloop merged commit b6d5ebb into master Oct 3, 2025
6 checks passed
@moshloop
moshloop deleted the pr/fix-files branch October 3, 2025 07:05
@github-actions

github-actions Bot commented Oct 3, 2025

Copy link
Copy Markdown

🎉 This PR is included in version 1.42.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant