aboutsummaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-09-18 20:15:16 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-09-18 20:15:16 +0200
commit71e2fd608ccc0e6e85833a70df253cf0cfae9607 (patch)
tree805611f8719edfc7c0c438477e8388a66d1fb2b5 /file.go
parent12e5f9b5d1688e6c896801a15364c59dea5a301e (diff)
Add bcrypt_pbdkf
Diffstat (limited to 'file.go')
-rw-r--r--file.go4
1 files changed, 4 insertions, 0 deletions
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 {