Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Skip setting CSP header on resource root URL request #19

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Nov 20, 2024

Since #18, CSP headers are also set for files served by DirectoryBrowserSupport from "Resource Root URL" requests when that shouldn't be the case.

This probably still clashes in some way with hudson.model.DirectoryBrowserSupport.CSP, TBD exactly (but that seems like a reasonable tradeoff, just needs to be documented).

Testing done

Freestyle job with shell build step echo '<script>alert(1)</script>' > index.html. Navigate to the file in the workspace browser. With RRURL set, the script executes (as intended, was regressed), otherwise does not (as intended).

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that and thanks for fixing this so quickly.

pom.xml Outdated Show resolved Hide resolved
Co-authored-by: Basil Crow <me@basilcrow.com>
@basil basil added the bug Something isn't working label Nov 20, 2024
@daniel-beck daniel-beck merged commit 6864c13 into main Nov 20, 2024
17 checks passed
@daniel-beck daniel-beck deleted the fix-resource-root-url-dbs-csp branch November 20, 2024 19:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants