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: webhook regex url with underscores #1755

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/configurations/destinations/webhook/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@
},
"webhookUrl": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$"
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$"
Copy link
Collaborator

Choose a reason for hiding this comment

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

_ is valid only for subdomains, not for domains

},
"webhookMethod": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion src/configurations/destinations/webhook/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"value": "webhookUrl",
"required": true,
"placeholder": "http://www.abcd.com",
"regex": "^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$"
"regex": "^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$"
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Issue Identified: Regex Fails to Exclude Base Domain "ngrok.io"

The current regex incorrectly allows the base domain http://ngrok.io, which should be excluded as per the negative lookahead. This occurs because the pattern (?![a-zA-Z0-9-]*\.ngrok\.io) permits zero characters before .ngrok.io.

Recommended Actions:

  • Update Regex: Modify the negative lookahead to (?![a-zA-Z0-9-]+\.)ngrok\.io to ensure that at least one character precedes .ngrok.io, effectively excluding the base domain.
  • Re-run Tests: Execute the updated shell script to verify that http://ngrok.io is correctly excluded.
🔗 Analysis chain

LGTM: Regex updated to allow underscores in domain names.

The change successfully addresses the PR objective by allowing underscores in the domain part of the webhook URL. This modification maintains all existing validations while expanding the range of accepted URLs.

While this change improves flexibility, it's worth noting that technically, according to RFC 1034, underscores are not allowed in domain names. However, they are widely used and accepted in practice. To ensure compatibility, you may want to verify that all systems interacting with these URLs can handle underscores in domain names without issues.

To verify the regex change, you can use the following script:

This script will test the updated regex against various valid and invalid URLs to ensure it behaves as expected.


[/run_scripts]


[/run_scripts]


[/run_scripts]

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash

# Test cases
valid_urls=(
  "http://example.com"
  "https://sub_domain.example.com"
  "http://sub-domain.example_domain.com/path"
)

invalid_urls=(
  "http://localhost"
  "https://example.localhost"
  "http://ngrok.io"
  "ftp://example.com"
)

# Function to test regex
test_regex() {
  local regex="$1"
  local url="$2"
  if echo "$url" | grep -qP "$regex"; then
    echo "PASS: $url"
  else
    echo "FAIL: $url"
  fi
}

# Extract regex from file
regex=$(grep -oP '(?<="regex": ").*(?=")' src/configurations/destinations/webhook/ui-config.json)

echo "Testing valid URLs:"
for url in "${valid_urls[@]}"; do
  test_regex "$regex" "$url"
done

echo -e "\nTesting invalid URLs:"
for url in "${invalid_urls[@]}"; do
  test_regex "$regex" "$url"
done

Length of output: 9882


Script:

#!/bin/bash

# Test cases
valid_urls=(
  "http://example.com"
  "https://sub_domain.example.com"
  "http://sub-domain.example_domain.com/path"
)
invalid_urls=(
  "http://localhost"
  "https://example.localhost"
  "http://ngrok.io"
  "ftp://example.com"
)

# Function to test regex
test_regex() {
  local regex="$1"
  local url="$2"
  if echo "$url" | grep -P "$regex" >/dev/null 2>&1; then
    echo "PASS: $url"
  else
    echo "FAIL: $url"
  fi
}

# Extract regex from file using jq for accurate parsing
regex=$(jq -r '.regex' src/configurations/destinations/webhook/ui-config.json)

echo "Extracted Regex: $regex"

echo "Testing valid URLs:"
for url in "${valid_urls[@]}"; do
  test_regex "$regex" "$url"
done

echo -e "\nTesting invalid URLs:"
for url in "${invalid_urls[@]}"; do
  test_regex "$regex" "$url"
done

Length of output: 2180


Script:

#!/bin/bash

# Display the entire JSON content for manual inspection
echo "Full JSON Content:"
cat src/configurations/destinations/webhook/ui-config.json

echo -e "\nListing top-level keys:"
jq 'keys' src/configurations/destinations/webhook/ui-config.json

echo -e "\nSearching for 'regex' key at any depth:"
jq '.. | .regex? // empty' src/configurations/destinations/webhook/ui-config.json

Length of output: 6740


Script:

#!/bin/bash

# Test cases
valid_urls=(
  "http://example.com"
  "https://sub_domain.example.com"
  "http://sub-domain.example_domain.com/path"
)
invalid_urls=(
  "http://localhost"
  "https://example.localhost"
  "http://ngrok.io"
  "ftp://example.com"
)

# Function to test regex
test_regex() {
  local regex="$1"
  local url="$2"
  if echo "$url" | grep -P "$regex" >/dev/null 2>&1; then
    echo "PASS: $url"
  else
    echo "FAIL: $url"
  fi
}

# Extract regex for "Webhook URL" field using jq
regex=$(jq -r '.uiConfig[].fields[] | select(.label == "Webhook URL").regex' src/configurations/destinations/webhook/ui-config.json)

echo "Extracted Regex for 'Webhook URL': $regex"

echo "Testing valid URLs:"
for url in "${valid_urls[@]}"; do
  test_regex "$regex" "$url"
done

echo -e "\nTesting invalid URLs:"
for url in "${invalid_urls[@]}"; do
  test_regex "$regex" "$url"
done

Length of output: 4938

},
{
"type": "singleSelect",
Expand Down
76 changes: 42 additions & 34 deletions test/data/validation/destinations/webhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -65,7 +65,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -89,7 +89,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -113,7 +113,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -137,7 +137,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -161,7 +161,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -185,7 +185,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand Down Expand Up @@ -242,7 +242,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand Down Expand Up @@ -669,7 +669,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -680,7 +680,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -691,7 +691,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -702,7 +702,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -713,7 +713,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -732,7 +732,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -743,7 +743,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -754,7 +754,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},

Expand All @@ -766,7 +766,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -777,7 +777,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -788,7 +788,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -799,7 +799,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -810,7 +810,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -821,7 +821,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -840,7 +840,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -851,7 +851,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -862,7 +862,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -873,7 +873,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -892,7 +892,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -903,7 +903,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -914,7 +914,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -925,7 +925,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -936,7 +936,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -947,7 +947,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -958,7 +958,7 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
Expand All @@ -969,7 +969,15 @@
},
"result": false,
"err": [
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
"webhookUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(https?:\\/\\/)(?![a-zA-Z0-9-]*\\.ngrok\\.io)(?!localhost|.*\\.localhost)([a-zA-Z0-9-_]{1,63}\\.)+[a-zA-Z]{2,}(\\/.*)?$\""
]
},
{
"testTitle": "should not throw error for valid url",
"config": {
"webhookUrl": "http://e2e_some.requestcatcher.com",
"webhookMethod": "GET"
},
"result": true
}
]
Loading