Project

General

Profile

Actions

Idea #6277

closed

[API] Make manifest format validation more strict, to make "munge" methods simpler and safer.

Added by Tom Clegg almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
API
Target version:
Start date:
06/10/2015
Due date:
Story points:
1.0

Description

A valid manifest format has three kinds of tokens: stream name, block locator, and file.

The current manifest parsing code (including signature validation and generation) has some implicit assumptions that it's working on a valid manifest, but:
  • there are some cases of "check this token just in case the manifest isn't valid" that could be optimized out if we had checked beforehand.
  • there are almost certainly some remaining loopholes with undefined behavior. For example, if a line (invalidly) starts with a block locator, does its signature get checked on the way in? Does it get a new signature on the way out? If the answers are "no" and "yes" respectively, it's a trivial exploit.

Rather than litter the signature code with edge cases covering invalid manifests, we should validate the format before doing any further parsing/munging operations. Subsequent manipulations can safely make the simplifying assumption that the manifest is valid.

The validation method itself should go in the Ruby SDK.

Valid manifest format is described at Keep manifest format.


Subtasks 7 (0 open7 closed)

Task #6287: Review branch: 6277-manifest-validation (ruby sdk updates only)ResolvedRadhika Chippada06/10/2015Actions
Task #6324: Review branch: 6277-manifest-validation-apiResolvedRadhika Chippada06/15/2015Actions
Task #6882: Review branch: 6277-check_manifest_validityResolvedTom Clegg08/04/2015Actions
Task #6488: Fail collection.create/update calls with invalid manifests.ResolvedRadhika Chippada06/10/2015Actions
Task #6487: Summarize invalid manifests present in production servers' databasesResolvedRadhika Chippada06/10/2015Actions
Task #6486: Review production logs to confirm no real clients are submitting any invalid manifestsResolvedRadhika Chippada06/10/2015Actions
Task #6747: Review summarization data (note #22)ResolvedTom Clegg07/22/2015Actions
Actions

Also available in: Atom PDF