Repository navigation
fix(n8n): validate Nextcloud origin in the n8n Code runtime - #150
Merged
Merged
Conversation
Use n8n-compatible JavaScript in the Code node and cover the missing URL constructor with a dedicated regression test. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Contributor
Documentation: All versions · LibreSign 16 development manual · Review notes Preview is separate from production. LibreSign 16 has not been released; the development manual describes the upcoming version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Follow-up to #149, discovered by importing and executing the workflow in actual n8n 2.47.3.
Reproduced failure
Prepare requestthrowsReferenceError: URL is not definedbecause n8n Code's sandbox does not provide the globalURLconstructor. The original Node VM tests suppliedURLexplicitly and missed this runtime restriction.Fix
URL.URL: undefinedand negative cases for credentials in URL, paths, query and malformed port.Verification
node --test examples/n8n/test-workflow.mjs: 8 passed, 0 failed.Prepare requestwithURL is not defined.Create request, where it stopped at the expectedCredentials not foundboundary before test credentials were configured.Full LibreSign signing/SMTP/WebDAV E2E is not asserted by these checks. Keep this PR separate and do not merge automatically.