Skip to content

Commit fc56748

Browse files
committed
Use start-line-marker in regexp to match full lines (for real now)
1 parent 7ca913a commit fc56748

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discovery_server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (d *DiscoveryServer) hello(cmd string) {
155155
d.outputError("hello", "HELLO already called")
156156
return
157157
}
158-
re := regexp.MustCompile(`(\d+) "([^"]+)"$`)
158+
re := regexp.MustCompile(`^(\d+) "([^"]+)"$`)
159159
matches := re.FindStringSubmatch(cmd)
160160
if len(matches) != 3 {
161161
d.outputError("hello", "Invalid HELLO command")

0 commit comments

Comments
 (0)