[
https://issues.apache.org/jira/browse/KAFKA-4930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945974#comment-15945974
]
ASF GitHub Bot commented on KAFKA-4930:
---------------------------------------
GitHub user soenkeliebau opened a pull request:
https://github.com/apache/kafka/pull/2755
KAFKA-4930: Added connector name validator …
…to check for empty connector name and illegal characters in connector
name. This also fixes KAFKA-4938 by removing the check for slashes in
connector name from ConnectorsResource.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/soenkeliebau/kafka KAFKA-4930
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/2755.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2755
----
commit 348d75dce006ddeb5beba0fc5ea5d761a4a87a82
Author: Soenke Liebau <[email protected]>
Date: 2017-03-28T21:06:43Z
KAFKA-4930: Added connector name validator to check for empty connector
name and illegal characters in connector name. This also fixes KAFKA-4938 by
removing the check for slashes in connector name from ConnectorsResource.
----
> Connect Rest API allows creating connectors with an empty name
> --------------------------------------------------------------
>
> Key: KAFKA-4930
> URL: https://issues.apache.org/jira/browse/KAFKA-4930
> Project: Kafka
> Issue Type: Bug
> Components: KafkaConnect
> Affects Versions: 0.10.2.0
> Reporter: Sönke Liebau
> Priority: Minor
>
> The Connect Rest API allows to deploy connectors with an empty name field,
> which then cannot be removed through the api.
> Sending the following request:
> {code}
> {
> "name": "",
> "config": {
> "connector.class":
> "org.apache.kafka.connect.tools.MockSourceConnector",
> "tasks.max": "1",
> "topics": "test-topic"
>
> }
> }
> {code}
> Results in a connector being deployed which can be seen in the list of
> connectors:
> {code}
> [
> "",
> "testconnector"
> ]{code}
> But cannot be removed via a DELETE call, as the api thinks we are trying to
> delete the /connectors endpoint and declines the request.
> I don't think there is a valid case for the connector name to be empty so
> perhaps we should add a check for this. I am happy to work on this.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)