Skip to content

Commit 14b45e3

Browse files
author
lamai93
committed
Trim jwt token before use.
1 parent 2001bcc commit 14b45e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"io/ioutil"
2828
"net/http"
2929
_ "net/http/pprof"
30+
"strings"
3031
"time"
3132

3233
"github.com/pkg/errors"
@@ -82,7 +83,7 @@ func cmdMainRun(cmd *cobra.Command, args []string) {
8283
if err != nil {
8384
log.Fatal(err)
8485
}
85-
token = string(data)
86+
token = strings.TrimSpace(string(data))
8687
} else if arangodbOptions.jwtSecret != "" {
8788
var err error
8889
token, err = CreateArangodJWT(arangodbOptions.jwtSecret)

0 commit comments

Comments
 (0)