Skip to content

Commit 45578ef

Browse files
committed
remove file validation
1 parent b840672 commit 45578ef

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

.github/workflows/add-netlify-links.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,11 @@ jobs:
2525
env:
2626
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
2727
run: |
28-
# Function to validate file paths
29-
validate_file_path() {
30-
local file_path="$1"
31-
# Allow only alphanumeric characters, _ . / and -
32-
if [[ ! "$file_path" =~ ^[a-zA-Z0-9._/-]+$ ]]; then
33-
echo "Invalid file path detected: $file_path" >&2
34-
return 1
35-
fi
36-
}
37-
3828
new_links=""
3929
base_link='https://deploy-preview-${{ github.event.number }}--mongodb-docs-csharp.netlify.app'
4030
files=$(echo "$CHANGED_FILES" | tr "," "\n")
4131
for file in $files; do
4232
echo "processing ${file}"
43-
44-
# Validate file path and skip if invalid
45-
validate_file_path "$file"
46-
if [ $? -ne 0 ]; then
47-
continue
48-
fi
49-
5033
if (! grep -s "includes/" <<< "$file") &&
5134
(! grep -s "images/" <<< "$file") &&
5235
(! grep -s "examples/" <<< "$file"); then

0 commit comments

Comments
 (0)