-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the problem that bundle files can be generated arbitrarily (#6028)
#### What type of PR is this? /kind bug /area core /area plugin /milestone 2.16.0 #### What this PR does / why we need it: Before the PR, any user can generate bundle files by providing random query param `v` while requesting bundle files. This PR refactors the whole bundle file generation method. 1. Do nothing if users provide arbitrary bundle file version 2. Better lock for writing bundle files if not exist #### Special notes for your reviewer: 1. Request `http://localhost:8090/apis/api.console.halo.run/v1alpha1/plugins/-/bundle.js?v=xyz` 2. Check if the file `xyz.js` in folder `$TMPDIR/halo-plugin-bundle**` #### Does this PR introduce a user-facing change? ```release-note None ```
- Loading branch information
Showing
5 changed files
with
364 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.