Skip to content

Restrict insecure URL protocols in FileUtil - #1383

Open
chrjohn wants to merge 4 commits into
masterfrom
fix-1246-restrict-dictionary-url-protocols
Open

chrjohn wants to merge 4 commits into
masterfrom
fix-1246-restrict-dictionary-url-protocols

Conversation

@chrjohn

@chrjohn chrjohn commented Nov 22, 2026

Copy link
Copy Markdown
Member

Summary

  • restrict FileUtil URL loading to trusted protocols by default (https, file, jar)
  • add an explicit opt-in override to re-enable plain HTTP via system property quickfixj.fileutil.url.allowHttp=true
  • add tests covering default HTTP rejection and explicit opt-in HTTP acceptance using a local HTTP server

Validation

  • ./mvnw -pl quickfixj-base -Dtest=quickfix.FileUtilTest test -DskipITs -Dmaven.javadoc.skip=true

Fixes #1246

chrjohn and others added 2 commits November 22, 2026 11:39
Block insecure remote protocols when loading resources via FileUtil.URL by allowing only https, file, and jar URLs.\n\nAlso add test coverage to verify HTTP URLs are rejected and update URL test to use HTTPS.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Keep HTTP URL loading disabled by default in FileUtil, but allow explicit re-enable via the system property quickfixj.fileutil.url.allowHttp=true.\n\nAdd tests verifying default rejection and opt-in acceptance using a local HTTP server.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.78%. Comparing base (72649cc) to head (9ac8fdc).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1383      +/-   ##
============================================
+ Coverage     71.73%   71.78%   +0.04%     
- Complexity     2306     2315       +9     
============================================
  Files           162      162              
  Lines          9106     9115       +9     
  Branches       1193     1198       +5     
============================================
+ Hits           6532     6543      +11     
+ Misses         2120     2119       -1     
+ Partials        454      453       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrjohn

chrjohn commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

@copilot please improve coverage, see #1383 (comment)

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

@copilot please improve coverage, see #1383 (comment)

Added deterministic tests for allowed file: URLs and rejected unsupported ftp: URLs. FileUtilTest passes (10 tests). Commit: 3a14865.

@chrjohn

chrjohn commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

@copilot
Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

@copilot
Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Added a deterministic HTTPS allowlist-path test and removed the unreachable null-protocol branch. All 11 FileUtilTest tests pass; local JaCoCo reports no missed branches on the modified protocol logic. Commit: 9ac8fdc.

This branch has not been deployed

No deployments
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.

Security implications of remote DataDictionary download

2 participants