File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments