summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpbuetow <35781042+pbuetow@users.noreply.github.com>2020-02-11 12:30:11 +0000
committerGitHub <noreply@github.com>2020-02-11 12:30:11 +0000
commit26fd900d5fd482c00a4d90efbd2a0776458c965f (patch)
tree658b7d21408242af1e6b806f0835f1e72c40052b
parent6c3ddb7746c062e967b44af568077f5ce2c9ec39 (diff)
parentb0fe5dc0ebf7a25dbd8361061865ede11d582861 (diff)
Merge pull request #10 from snonux/master
Allow whitespaces in regexes
-rw-r--r--internal/io/prompt/prompt.go (renamed from internal/prompt/prompt.go)0
-rw-r--r--internal/server/handlers/readcommand.go3
-rw-r--r--internal/server/handlers/serverhandler.go2
-rw-r--r--internal/ssh/client/hostkeycallback.go2
-rw-r--r--internal/version/version.go2
5 files changed, 5 insertions, 4 deletions
diff --git a/internal/prompt/prompt.go b/internal/io/prompt/prompt.go
index a438d33..a438d33 100644
--- a/internal/prompt/prompt.go
+++ b/internal/io/prompt/prompt.go
diff --git a/internal/server/handlers/readcommand.go b/internal/server/handlers/readcommand.go
index e4079e8..6ab41cd 100644
--- a/internal/server/handlers/readcommand.go
+++ b/internal/server/handlers/readcommand.go
@@ -27,7 +27,8 @@ func newReadCommand(server *ServerHandler, mode omode.Mode) *readCommand {
func (r *readCommand) Start(ctx context.Context, argc int, args []string) {
regex := "."
if argc >= 4 {
- regex = args[3]
+ regex = strings.Join(args[3:], " ")
+ logger.Debug("Joined regex", regex)
}
if argc < 3 {
r.server.sendServerMessage(logger.Warn(r.server.user, commandParseWarning, args, argc))
diff --git a/internal/server/handlers/serverhandler.go b/internal/server/handlers/serverhandler.go
index 3f0d6ce..b840c77 100644
--- a/internal/server/handlers/serverhandler.go
+++ b/internal/server/handlers/serverhandler.go
@@ -172,7 +172,7 @@ func (h *ServerHandler) handleProtocolVersion(args []string) ([]string, int, err
}
func (h *ServerHandler) handleBase64(args []string, argc int) ([]string, int, error) {
- err := errors.New("Unable to decode client message")
+ err := errors.New("Unable to decode client message, DTail server and client versions not compatible")
if argc != 2 || args[0] != "base64" {
return args, argc, err
diff --git a/internal/ssh/client/hostkeycallback.go b/internal/ssh/client/hostkeycallback.go
index 7ae2396..d090d7f 100644
--- a/internal/ssh/client/hostkeycallback.go
+++ b/internal/ssh/client/hostkeycallback.go
@@ -11,7 +11,7 @@ import (
"time"
"github.com/mimecast/dtail/internal/io/logger"
- "github.com/mimecast/dtail/internal/prompt"
+ "github.com/mimecast/dtail/internal/io/prompt"
"golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/knownhosts"
diff --git a/internal/version/version.go b/internal/version/version.go
index 3c057df..e3014a4 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -11,7 +11,7 @@ const (
// Name of DTail.
Name string = "DTail"
// Version of DTail.
- Version string = "2.0.0"
+ Version string = "2.0.3"
// Additional information for DTail
Additional string = ""
// ProtocolCompat -ibility version.