sub parse;
sub auth_check;
+ sub upload_check;
}
{
::check_replay($self->{oplist}, $dsig_info->{sig_creation});
}
+ sub upload_check { }
+
}
{
unless defined $fsig_info->{sig_creation};
::check_signature_timestamp(file => $fsig_info->{sig_creation});
}
+
+ sub upload_check {
+ my $self = shift;
+
+ # Check uploaded file for known Automake CVE issues.
+ ::check_automake_vulnerabilities
+ (File::Spec->catfile(::CONF_DIR_Scratch, $self->upload_filename));
+ }
}
\f
$Phase = 'VL';
- # If the upload carries a file, check it for known Automake CVE issues.
- check_automake_vulnerabilities
- (File::Spec->catfile(CONF_DIR_Scratch, $packet->upload_filename))
- if $packet->has_uploaded_file;
+ $packet->upload_check;
# If the upload installs a file, check if the final file exists; if so,
# require the 'replace' option to be set.