Skip to content

HDXDSYS-3018 Improve resource download handling - #125

Merged
mcarans merged 3 commits into
mainfrom
fix/download-auth-and-filename
Oct 23, 2026
Merged

mcarans merged 3 commits into
mainfrom
fix/download-auth-and-filename

Conversation

@mcarans

@mcarans mcarans commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Use an authenticated session for resource downloads only when the URL is on the configured HDX site
  • Normalise download filenames derived from resource metadata
  • Update dependencies

Tests

  • Added test_download_security

…ctories from download filename

Resource.download/download_datastore sent the Authorization header to any
resource URL, including external hosts. The filename built from the resource
name and format could contain absolute paths or ../ and write outside the
target folder.
@github-actions

Copy link
Copy Markdown

Test Results

194 tests  +1   193 ✅ ±0   1m 6s ⏱️ -4s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     1 ❌ +1 

For more details on these failures, see this check.

Results for commit 41bc5ad. ± Comparison against base commit a70b2a5.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Test Results

194 tests  +1   194 ✅ +1   1m 11s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit cdd087c. ± Comparison against base commit a70b2a5.

♻️ This comment has been updated with latest results.

@mcarans mcarans changed the title Fix API key leak and path traversal in resource download HDXDSYS-3018 Security review: Fix API key leak and path traversal in resource download Oct 23, 2026
@coveralls

coveralls commented Oct 23, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 97.318% (+0.01%) from 97.308% — fix/download-auth-and-filename into main

@mcarans
mcarans merged commit bf95289 into main Oct 23, 2026
6 of 7 checks passed
@mcarans mcarans changed the title HDXDSYS-3018 Security review: Fix API key leak and path traversal in resource download HDXDSYS-3018 Improve resource download handling Oct 23, 2026
@mcarans
mcarans deleted the fix/download-auth-and-filename branch October 23, 2026 04:56
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