diff options
author | mrsdizzie <info@mrsdizzie.com> | 2019-11-03 06:08:18 -0500 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-03 19:08:18 +0800 |
commit | dce22efbee6a04b8c19348dac831cd88b18ac07c (patch) | |
tree | 9e40551545635048d891528686d3361e43bf55eb /modules/structs/pull.go | |
parent | 022d2d8beb6297016ed26b0090c6a4a4ac404437 (diff) | |
download | gitea-dce22efbee6a04b8c19348dac831cd88b18ac07c.tar.gz gitea-dce22efbee6a04b8c19348dac831cd88b18ac07c.zip |
Fix SSH2 conditonal in key parsing code (#8806)
Avoid out of bounds error by using strings.HasPrefix to check for
starting SSH2 text rather than assuming user input has at least 31
characters.
Add tests for bad input as well.
Fixes #8800
Diffstat (limited to 'modules/structs/pull.go')
0 files changed, 0 insertions, 0 deletions