Refuse a manifest whose inner message version is not one (closes #169)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Loading a manifest checked only the outer message's version, so an inner message of version 0 or a later version loaded as if it were version one, although docs/FORMAT.md requires VERSION_ONE in both. deserializeInner now refuses any other inner version with the same error as an unknown outer version. Two existing tests built inner messages with no version and expected them to load; they now write version one. Model: opus-5-5
This commit was merged in pull request #173.
This commit is contained in:
@@ -278,6 +278,10 @@ func (m *manifest) deserializeInner() error {
|
||||
return fmt.Errorf("deserialize: unmarshal inner: %w", err)
|
||||
}
|
||||
|
||||
if m.pbInner.GetVersion() != MFFile_VERSION_ONE {
|
||||
return errUnknownVersion
|
||||
}
|
||||
|
||||
// Validate inner UUID
|
||||
err = validateUUID(m.pbInner.GetUuid())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user