Key names cannot include // and this is not documented
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.
#### Overview of the Issue
Keys cannot contain a double-slash (`//`). Attempting to do so results in an error.
This is a duplicate of #3476 which was closed without being addressed.
This is a significant oversight. We just had an application make it to production, and then encountered this issue. We tested for keys containing `/`, but didn't consider testing for `//`. Now we have to go back and add encoding to all our existing keys, which is a breaking change.
#### Reproduction Steps
Steps to reproduce this issue, eg:
```
# consul kv put foo//bar x
Error! Failed writing data: Unexpected response code: 404 ()
```
### Consul info for both Client and Server
Client info
```
agent:
check_monitors = 0
check_ttls = 0
checks = 0
services = 0
build:
prerelease =
revision = bd257019
version = 1.14.3
version_metadata =
consul:
acl = disabled
bootstrap = false
known_datacenters = 1
leader = true
leader_addr = 127.0.0.1:8300
server = true
raft:
applied_index = 117123
commit_index = 117123
fsm_pending = 0
last_contact = 0
last_log_index = 117123
last_log_term = 2
last_snapshot_index = 114695
last_snapshot_term = 2
latest_configuration = [{Suffrage:Voter ID:483321d0-ca4c-ff74-f421-370b9c05a608 Address:127.0.0.1:8300}]
latest_configuration_index = 0
num_peers = 0
protocol_version = 3
protocol_version_max = 3
protocol_version_min = 0
snapshot_version_max = 1
snapshot_version_min = 0
state = Leader
term = 2
runtime:
arch = amd64
cpu_count = 16
goroutines = 127
max_procs = 16
os = linux
version = go1.19.4
serf_lan:
coordinate_resets = 0
encrypted = false
event_queue = 1
event_time = 2
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 1
members = 1
query_queue = 0
query_time = 1
serf_wan:
coordinate_resets = 0
encrypted = false
event_queue = 0
event_time = 1
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 1
members = 1
query_queue = 0
query_time = 1
```
Server info
```
agent:
check_monitors = 0
check_ttls = 0
checks = 0
services = 0
build:
prerelease =
revision = bd257019
version = 1.14.3
version_metadata =
consul:
acl = disabled
bootstrap = false
known_datacenters = 1
leader = true
leader_addr = 127.0.0.1:8300
server = true
raft:
applied_index = 117123
commit_index = 117123
fsm_pending = 0
last_contact = 0
last_log_index = 117123
last_log_term = 2
last_snapshot_index = 114695
last_snapshot_term = 2
latest_configuration = [{Suffrage:Voter ID:483321d0-ca4c-ff74-f421-370b9c05a608 Address:127.0.0.1:8300}]
latest_configuration_index = 0
num_peers = 0
protocol_version = 3
protocol_version_max = 3
protocol_version_min = 0
snapshot_version_max = 1
snapshot_version_min = 0
state = Leader
term = 2
runtime:
arch = amd64
cpu_count = 16
goroutines = 127
max_procs = 16
os = linux
version = go1.19.4
serf_lan:
coordinate_resets = 0
encrypted = false
event_queue = 1
event_time = 2
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 1
members = 1
query_queue = 0
query_time = 1
serf_wan:
coordinate_resets = 0
encrypted = false
event_queue = 0
event_time = 1
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 1
members = 1
query_queue = 0
query_time = 1
```
### Operating system and Environment details
docker.io/library/consul:1.14.3
Contributor guide
Assessment
This issue has not been assessed yet.