Skip to content

Commit

Permalink
Jobset: Don't display properties without a spec
Browse files Browse the repository at this point in the history
While in general this wouldn't be a problem, because the values would be
sent out as-is using the API it will become a problem as soon as type
"secret" is used in a property and that property is no longer existing
in the spec.

It would then spit out all the secrets where there is no specification
for the type, which is definitely not what we want.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
  • Loading branch information
aszlig committed Aug 7, 2016
1 parent 064a7ff commit 18a150f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/Hydra/Controller/Jobset.pm
Expand Up @@ -253,6 +253,10 @@ sub cleanProperties {
);
} else {
foreach my $prop (keys %$props) {
unless ($spec->{properties}->{$prop}) {
delete $props->{$prop};
next;
}
$props->{$prop} = cleanProperty(
$c, $spec->{properties}->{$prop}, $props->{$prop}
);
Expand Down

0 comments on commit 18a150f

Please sign in to comment.