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): Don't allow using credentials that are not part of the same project #9916

Conversation

despairblue
Copy link
Contributor

@despairblue despairblue commented Jul 2, 2024

Summary

It was possible to use the API directly to add credentials to a workflow that were not owned by the same project that the workflow was owned by.
This is not a security issue, because the user could not have added credentials they don't have access to. The workflow would just have failed to run.

Nonetheless, this is a bug that should be fixed.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/PAY-1650/bug-n8n-is-allowing-users-to-save-workflows-with-credentials-not

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 Jul 2, 2024
@despairblue despairblue marked this pull request as ready for review July 2, 2024 14:32
Copy link

cypress bot commented Jul 3, 2024

4 flaky tests on run #5755 ↗︎

0 399 0 0 Flakiness 4

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 despairblue 🗃️ e2e/*
Project: n8n Commit: 5db45f7f01
Status: Passed Duration: 05:34 💡
Started: Jul 3, 2024 9:18 AM Ended: Jul 3, 2024 9:24 AM
Flakiness  5-ndv.cy.ts • 3 flaky tests

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Screenshots Video
NDV > should retrieve remote options when non-required params throw errors Screenshots Video
NDV > Stop listening for trigger event from NDV Screenshots Video
Flakiness  30-langchain.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Langchain Integration > should add and use Manual Chat Trigger node together with Agent node Test Replay Screenshots Video

Review all test suite changes for PR #9916 ↗︎

Copy link
Contributor

github-actions bot commented Jul 3, 2024

✅ All Cypress E2E specs passed

@despairblue despairblue merged commit ab2a548 into master Jul 3, 2024
28 checks passed
@despairblue despairblue deleted the pay-1650-bug-n8n-is-allowing-users-to-save-workflows-with-credentials branch July 3, 2024 09:43
@github-actions github-actions bot mentioned this pull request Jul 3, 2024
@janober
Copy link
Member

janober commented Jul 3, 2024

Got released with n8n@1.49.0

adrian-martinez-onestic pushed a commit to onesdata/n8n-fork that referenced this pull request Jul 8, 2024
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.

None yet

3 participants