Package org.apache.tika.server
Class URLEnabledInputStreamFactory
- java.lang.Object
-
- org.apache.tika.server.URLEnabledInputStreamFactory
-
- All Implemented Interfaces:
InputStreamFactory
public class URLEnabledInputStreamFactory extends Object implements InputStreamFactory
This class looks for "fileUrl" in the http header. If it is not null and not empty, this will return a new TikaInputStream from the URL.This is not meant to be used in place of a robust, responsible crawler. Rather, this is a convenience factory.
WARNING: Unless you carefully lock down access to the server, whoever has access to this service will have the read access of the server. In short, anyone with access to this service could request and get "file:///etc/supersensitive_file_dont_read.txt". Or, if your server has access to your intranet, and you let the public hit this service, they will now have access to your intranet. See CVE-2015-3271
-
-
Constructor Summary
Constructors Constructor Description URLEnabledInputStreamFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description InputStream
getInputSteam(InputStream is, javax.ws.rs.core.HttpHeaders httpHeaders)
Deprecated.InputStream
getInputSteam(InputStream is, Metadata metadata, javax.ws.rs.core.HttpHeaders httpHeaders)
-
-
-
Method Detail
-
getInputSteam
@Deprecated public InputStream getInputSteam(InputStream is, javax.ws.rs.core.HttpHeaders httpHeaders) throws IOException
Deprecated.- Specified by:
getInputSteam
in interfaceInputStreamFactory
- Parameters:
is
-httpHeaders
-- Returns:
- Throws:
IOException
-
getInputSteam
public InputStream getInputSteam(InputStream is, Metadata metadata, javax.ws.rs.core.HttpHeaders httpHeaders) throws IOException
- Specified by:
getInputSteam
in interfaceInputStreamFactory
- Throws:
IOException
-
-