public class SafeArchiveServingAction extends Object implements hudson.model.Action
| Constructor and Description |
|---|
SafeArchiveServingAction(File rootDir,
String urlName,
String indexFile,
String iconName,
String title,
String... safeExtensions)
Create a safe archive serving action.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doDynamic(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
String |
getDisplayName() |
String |
getIconFileName() |
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.
|
public SafeArchiveServingAction(File rootDir, String urlName, String indexFile, String iconName, String title, 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 URLiconName - The icon used for the action in the side paneltitle - The title of this action in the side panelsafeExtensions - 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 - If the platform does unexpectedly not support SHA-1IOExceptionpublic String getIconFileName()
getIconFileName in interface hudson.model.Actionpublic String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObjectpublic String getUrlName()
getUrlName in interface hudson.model.Actionpublic File getRootDir()
public void doDynamic(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionCopyright © 2016–2017. All rights reserved.