mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 07:11:08 +00:00
lib/upgrade: Use strings.Reader instead of bytes.Buffer
This commit is contained in:
parent
ae70046b49
commit
286a25ae49
@ -391,7 +391,7 @@ func verifyUpgrade(archiveName, tempName string, sig []byte) error {
|
|||||||
// multireader. This ensures that it is not only a bonafide syncthing
|
// multireader. This ensures that it is not only a bonafide syncthing
|
||||||
// binary, but it is also of exactly the platform and version we expect.
|
// binary, but it is also of exactly the platform and version we expect.
|
||||||
|
|
||||||
mr := io.MultiReader(bytes.NewBufferString(archiveName+"\n"), fd)
|
mr := io.MultiReader(strings.NewReader(archiveName+"\n"), fd)
|
||||||
err = signature.Verify(SigningKey, sig, mr)
|
err = signature.Verify(SigningKey, sig, mr)
|
||||||
fd.Close()
|
fd.Close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user