aboutsummaryrefslogtreecommitdiff
path: root/session.go
diff options
context:
space:
mode:
Diffstat (limited to 'session.go')
-rw-r--r--session.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/session.go b/session.go
index 3478802..0867b16 100644
--- a/session.go
+++ b/session.go
@@ -86,5 +86,9 @@ func GetPasswordFromSession(r *http.Request) (string, string) {
parts := strings.Split(token, "|")
- return parts[0], parts[1]
+ if len(parts) > 1 {
+ return parts[0], parts[1]
+ }
+
+ return "", ""
}