]> source.dussan.org Git - gitea.git/commit
Prevent NPE if gitea uploader fails to open url (#18080)
authorzeripath <art27@cantab.net>
Thu, 23 Dec 2021 16:27:33 +0000 (16:27 +0000)
committerGitHub <noreply@github.com>
Thu, 23 Dec 2021 16:27:33 +0000 (16:27 +0000)
commita5df7ba6bf57c764b1c5e4c67dbbdf5b115765c9
tree4cf3be8c68ed7625e663e039a596b577769ea4b8
parentffc08c1914fbe6a5a5ebe9c8571b790ac6024d71
Prevent NPE if gitea uploader fails to open url (#18080)

If http.Get() returns an error return nil and err before attempting to
use the broken file.

Thanks to walker xiong for spotting this bug.

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/uri/uri.go