Skip to content

Commit

Permalink
Prevent HTML injection (#812)
Browse files Browse the repository at this point in the history
* Prevent HTML injection

* Update cnb.yaml

---------

Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia authored Dec 23, 2024
1 parent cacc58c commit 5c534f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/cnb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,5 @@ jobs:
SOURCE_REPO: 'https://github.com/friendsofhyperf/components.git'
DESTINATION_REPO: 'https://cnb:${{ secrets.CNB_TOKEN }}@cnb.cool/friendsofhyperf/components.git'
run: |
# git clone --mirror "$SOURCE_REPO" && cd `basename "$SOURCE_REPO"`
# git remote set-url --push origin "$DESTINATION_REPO"
# git fetch -p origin
# git for-each-ref --format 'delete %(refname)' refs/pull | git update-ref --stdin
# git push --mirror
git clone --mirror "$SOURCE_REPO" && cd `basename "$SOURCE_REPO"`
git push -f --prune "$DESTINATION_REPO" "refs/heads/*:refs/heads/*" "refs/tags/*:refs/tags/*"
2 changes: 1 addition & 1 deletion src/web-tinker/src/Tinker.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ protected function cleanOutput(string $output): string
// Remove ANSI color codes
$output = preg_replace('/\e\[[0-9;]*m/', '', $output);

return trim($output);
return htmlentities($output);
}
}

0 comments on commit 5c534f7

Please sign in to comment.