public class SafeArchiveServingAction extends AssessmentReportBaseAction
BASE_DIR, ICON_DIR, REPORT_PAGE
Constructor and Description |
---|
SafeArchiveServingAction(File rootDir,
String urlName,
String indexFile,
String... safeExtensions)
Create a safe archive serving action.
|
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doDynamic(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
File |
getRootDir() |
String |
getUrlName() |
void |
processDirectory()
Record the checksums of files in the specified directory and its descendants unless a file type is whitelisted as
safe.
|
getDisplayName, getIconFileName
public SafeArchiveServingAction(File rootDir, String urlName, String indexFile, String... safeExtensions)
rootDir
- The root directory to be served by this actionurlName
- The URL name used for this actionindexFile
- The file name of the index file to be served when accessing the urlName URLsafeExtensions
- The file extensions to be skipped from checksum recording and verification. These are file
types whose unauthorized modification does not constitute a risk to users when viewed in a
web browser. This should be resource file extensions like "gif" or "png" or file extensions
of files not viewed in a browser like "zip" or "gz". Never specify file types possibly
containing scripts or other possibly malicious data that can exploit users' browsers
(html, js, swf, css, …).public void processDirectory() throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmException
IOException
public String getUrlName()
getUrlName
in interface hudson.model.Action
getUrlName
in class AssessmentReportBaseAction
public File getRootDir()
public org.kohsuke.stapler.HttpResponse doDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
IOException
Copyright © 2016–2022. All rights reserved.