Commit graph

5 commits

Author SHA1 Message Date
कारतोफ्फेलस्क्रिप्ट™ 2b075bfc2d
fix(editor): Sanitize HTML binary-data before rendering in the UI (#7400) 2023-10-11 12:09:19 +02:00
Iván Ovejero 6d6e2488c6
refactor(core): Generalize binary data manager interface (no-changelog) (#7164)
Depends on: #7092 | Story:
[PAY-768](https://linear.app/n8n/issue/PAY-768)

This PR: 
- Generalizes the `IBinaryDataManager` interface.
- Adjusts `Filesystem.ts` to satisfy the interface.
- Sets up an S3 client stub to be filled in in the next PR.
- Turns `BinaryDataManager` into an injectable service.
- Adjusts the config schema and adds new validators.

Note that the PR looks large but all the main changes are in
`packages/core/src/binaryData`.

Out of scope:
- `BinaryDataManager` (now `BinaryDataService`) and `Filesystem.ts` (now
`fs.client.ts`) were slightly refactored for maintainability, but fully
overhauling them is **not** the focus of this PR, which is meant to
clear the way for the S3 implementation. Future improvements for these
two should include setting up a backwards-compatible dir structure that
makes it easier to locate binary data files to delete, removing
duplication, simplifying cloning methods, using integers for binary data
size instead of `prettyBytes()`, writing tests for existing binary data
logic, etc.

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-09-22 17:22:12 +02:00
कारतोफ्फेलस्क्रिप्ट™ e57e85edf7
refactor: Delete unnecessary interface re-exports from core, and delete unused code in nodes-base (no-changelog) (#6631) 2023-07-12 11:15:38 +02:00
कारतोफ्फेलस्क्रिप्ट™ 45dc985af7
fix(Google Sheets Node): Upgrade xlsx to address CVE-2023-30533 (#6172)
[GitHub Advisory](https://github.com/advisories/GHSA-4r6h-8v6p-xvw6)
2023-05-04 17:10:54 +02:00
Marcus 74fc1414d7
test(Spreadsheet File Node): Unit tests (no-changelog) (#5385)
* ️test setup

* ️fix  'testData' implicitly has an 'any' type.

*  test github action file binary data reading

*  checking for output binary equality

*  writing files to different formats

*  reading spreadsheet with different options

* ️improve workflow file path replacement

* 🐛 fixing string.at() not supported in node 14.

* 🐛 trying to fix github action test error

*  fix for empty binary

*  switch for binary test

* ️test helpers now return/compare json and binary (if not empty))

*  removed commented console log

---------

Co-authored-by: Michael Kret <michael.k@radency.com>
2023-02-09 09:00:29 +01:00