| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
redirectToGitHubRawContent indexed strings.Split(u.Path, "/")[3] without checking the slice length, so a github.com changelog URL with fewer than four path segments panicked with index out of range and aborted the whole run. Split once and only rewrite the segment when it exists, leaving short paths untouched. Added a unit test covering the short path and the tree->blob rewrite. Fixes updatecli#9688 Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
|
Tick the box to add this pull request to the merge queue (same as @mergifyio queue).
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
redirectToGitHubRawContent indexed strings.Split(u.Path, "/")[3] without checking the slice length. A github.com changelog URL with fewer than four path segments (e.g. an annotation pointing at https://github.com/CHANGELOG.md) panicked with index out of range and aborted the whole run, since Changelog() calls it for every image advertising such an annotation.
Split once and only rewrite the segment when it exists, leaving short paths untouched. Added a unit test covering the short path and the tree->blob rewrite.
Fixes #9688