Skip to content

Commit

Permalink
don't restrict delegation names
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Cordell <cordell.evan@gmail.com>
  • Loading branch information
ecordell committed May 3, 2017
1 parent 58d9496 commit ea277f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tuf/data/targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package data
import (
"errors"
"fmt"
"path"

"github.com/docker/go/canonical/json"
)
Expand Down Expand Up @@ -43,7 +42,7 @@ func isValidTargetsStructure(t Targets, roleName RoleName) error {
}

for _, roleObj := range t.Delegations.Roles {
if !IsDelegation(roleObj.Name) || path.Dir(roleObj.Name.String()) != roleName.String() {
if !IsDelegation(roleObj.Name) {
return ErrInvalidMetadata{
role: roleName, msg: fmt.Sprintf("delegation role %s invalid", roleObj.Name)}
}
Expand Down

0 comments on commit ea277f8

Please sign in to comment.