mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Fix pr preview vulnerability (#5461)
* Closes #5458 * [x] I have followed the instructions in the PR template
This commit is contained in:
6
.github/workflows/preview_build.yml
vendored
6
.github/workflows/preview_build.yml
vendored
@@ -42,9 +42,11 @@ jobs:
|
||||
- name: Generate meta.json
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.number }}
|
||||
PR_BRANCH: ${{ github.head_ref }}
|
||||
URL_SLUG: ${{ github.event.number }}-${{ github.head_ref }}
|
||||
run: |
|
||||
echo "{\"pr_number\": \"$PR_NUMBER\", \"pr_branch\": \"$PR_BRANCH\"}" > meta.json
|
||||
# Sanitize the URL_SLUG to only contain alphanumeric characters and dashes
|
||||
URL_SLUG=$(echo $URL_SLUG | tr -cd '[:alnum:]-')
|
||||
echo "{\"pr_number\": \"$PR_NUMBER\", \"url_slug\": \"$URL_SLUG\"}" > meta.json
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user