Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(core): Sanitise IdP provided information in SAML test pages #11171

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

valya
Copy link
Contributor

@valya valya commented Oct 8, 2024

Summary

If an owner tested logging in via SAML, it was possible for a self inflicted XSS to occur on the results pages.

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Oct 8, 2024
Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

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

thanks for removing the template strings from the handlebars templates. we can now extract these into separate files in packages/cli/templates, and pre-compile these the way we do for oauth and form pages.
If you prefer we can do this in a separate PR.

@valya valya force-pushed the sec-143-cross-site-scripting-cwe-79 branch from e04c586 to b677b9a Compare October 15, 2024 15:48
@netroy netroy changed the title fix: Sanitise IdP provided information in SAML test pages fix(core): Sanitise IdP provided information in SAML test pages Oct 15, 2024
netroy
netroy previously approved these changes Oct 15, 2024
Copy link

cypress bot commented Oct 15, 2024

n8n    Run #7524

Run Properties:  status check passed Passed #7524  •  git commit 54431a3c77: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 valya 🗃️ e2e/*
Project n8n
Branch Review sec-143-cross-site-scripting-cwe-79
Run status status check passed Passed #7524
Run duration 04m 25s
Commit git commit 54431a3c77: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 valya 🗃️ e2e/*
Committer कारतोफ्फेलस्क्रिप्ट™
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 458
View all changes introduced in this branch ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@netroy netroy force-pushed the sec-143-cross-site-scripting-cwe-79 branch from 44e806c to 54431a3 Compare October 23, 2024 10:54
Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

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

this code still needs a lot more work. but for now I've moved my changes to a separate branch here, so that we can merge this to please the compliance gods.

Copy link
Contributor

✅ All Cypress E2E specs passed

@netroy netroy merged commit 74fc388 into master Oct 23, 2024
33 checks passed
@netroy netroy deleted the sec-143-cross-site-scripting-cwe-79 branch October 23, 2024 11:22
@github-actions github-actions bot mentioned this pull request Oct 24, 2024
@janober
Copy link
Member

janober commented Oct 24, 2024

Got released with n8n@1.65.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants