Package org.ametys.web.resources
Class WebImageResourceHandler
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.resources.SimpleResourceHandler
org.ametys.core.resources.ImageResourceHandler
org.ametys.web.resources.WebImageResourceHandler
- All Implemented Interfaces:
ResourceHandler,LogEnabled,Serviceable
This web implementation mark skin svg as safe
-
Field Summary
FieldsFields inherited from class org.ametys.core.resources.ImageResourceHandler
SAFE_SVG_PATTERNFields inherited from class org.ametys.core.resources.SimpleResourceHandler
_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisUnsafeSVG(String sourceURI) Is the SVG file denoted by the uri potentially unsafe?Methods inherited from class org.ametys.core.resources.ImageResourceHandler
generate, getKey, setupMethods inherited from class org.ametys.core.resources.SimpleResourceHandler
getLastModified, getMimeType, getValidity, serviceMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.core.resources.ResourceHandler
acceptRanges, generate, getLength, shouldUseSourceContentLength
-
Field Details
-
SKIN_SAFE_SVG_PATTERN
url for safe svg files
-
-
Constructor Details
-
WebImageResourceHandler
public WebImageResourceHandler()
-
-
Method Details
-
isUnsafeSVG
Description copied from class:ImageResourceHandlerIs the SVG file denoted by the uri potentially unsafe?- Overrides:
isUnsafeSVGin classImageResourceHandler- Parameters:
sourceURI- The svg file uri- Returns:
- true if the svg is not from a trusted source
-