Skip to content

Commit

Permalink
Push to modules after all error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Jun 10, 2017
1 parent dc99c51 commit da0fa74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/updatelist.pl
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
if ($response->is_success) {
my $module = decode_json $response->content;
_normalize_module($module);
push @modules, $module;
my $name = $module->{name};
if ($name =~ m{[/\\]} || $name =~ m{\.\.}) {
die "Invalid module name '$name'";
}
open my $OUT, '>', File::Spec->catfile($OUTDIR, 'module', $name);
print $OUT $response->content;
close $OUT;
push @modules, $module;
}
else {
die 'Unsuccessful HTTP response: ' . $response->code
Expand Down

0 comments on commit da0fa74

Please sign in to comment.