From 71e2fd608ccc0e6e85833a70df253cf0cfae9607 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 18 Sep 2016 20:15:16 +0200 Subject: Add bcrypt_pbdkf --- file.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'file.go') diff --git a/file.go b/file.go index 4f3d449..68737ad 100644 --- a/file.go +++ b/file.go @@ -34,6 +34,10 @@ func Parse(r io.Reader) (File, error) { if !strings.HasPrefix(comment, commentHdr) { return File{}, errors.New("expected untrusted header") } + // Backward compatibility with original signify + if len(comment) > 1024 { + return File{}, errors.New("comment line too long") + } comment = comment[len(commentHdr):] b64, err := buf.ReadBytes('\n') if err != nil { -- cgit v1.2.3