java.lang.Object | |
↳ | com.atlassian.jira.web.util.HostileAttachmentsHelper |
A tool for loading and encapsulating the local policy for which MIME Content Types and file extensions may contain active executable client-side content and which therefore should be treated carefully to avoid XSS attacks via uploading these files as attachments.
Browsers use Content-Type headers and file extensions to decide whether to attempt to execute a file in a client context. Examples include javascript in html and ActionScript in .swf (Flash) binaries. Since these runtimes have access to the client-side state of the browser, they represent a potential means to steal session cookie contents and other XSS attacks.Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DELIMITER_REGEX | File extensions and content types in the config file are parsed from a list of items delimited by this regex. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Determines if the given String is a MIME Content Type denoting client-executable active content such that if the
browser opens the file, its execution could have access to the browser DOM etc.
| |||||||||||
Determines if the given String has an extension denoting a client-executable active content type such that if the
browser opens the file, its execution could have access to the browser DOM etc.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object |
File extensions and content types in the config file are parsed from a list of items delimited by this regex.
Determines if the given String is a MIME Content Type denoting client-executable active content such that if the browser opens the file, its execution could have access to the browser DOM etc. E.g. text/html Note the check is case insensitive.
contentType | the MIME Content Type string. |
---|
Determines if the given String has an extension denoting a client-executable active content type such that if the browser opens the file, its execution could have access to the browser DOM etc. Examples include .html, .svg and .swf. Note the check is case insensitive.
name | the file name. |
---|