Package org.apache.tika.server.core
Class FetcherStreamFactory
- java.lang.Object
-
- org.apache.tika.server.core.FetcherStreamFactory
-
- All Implemented Interfaces:
InputStreamFactory
public class FetcherStreamFactory extends Object implements InputStreamFactory
This class looks for "fetcherName" in the http header. If it is not null and not empty, this will return a new TikaInputStream from the fetch key and the base path as set in the definition of the named fetcher.Users may also specify the "fetcherName"e; and "fetchKey" in query parameters with in the request. This is the only option if there are non-ASCII characters in the "fetcherName"e; or "fetchKey".
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 FetcherStreamFactory(FetcherManager fetcherManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getInputStream(InputStream is, Metadata metadata, javax.ws.rs.core.HttpHeaders httpHeaders)
InputStream
getInputStream(InputStream is, Metadata metadata, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.core.UriInfo uriInfo)
-
-
-
Constructor Detail
-
FetcherStreamFactory
public FetcherStreamFactory(FetcherManager fetcherManager)
-
-
Method Detail
-
getInputStream
public InputStream getInputStream(InputStream is, Metadata metadata, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.core.UriInfo uriInfo) throws IOException
- Specified by:
getInputStream
in interfaceInputStreamFactory
- Throws:
IOException
-
getInputStream
public InputStream getInputStream(InputStream is, Metadata metadata, javax.ws.rs.core.HttpHeaders httpHeaders) throws IOException
- Specified by:
getInputStream
in interfaceInputStreamFactory
- Returns:
- Throws:
IOException
-
-