Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
adbaa4c0
Commit
adbaa4c0
authored
Oct 24, 2019
by
Ivar Derksen
Committed by
Sietse Ringers
Oct 24, 2019
Browse files
Fix for nil pointer dereference when not having network interfaces
parent
fb7d2349
Changes
1
Hide whitespace changes
Inline
Side-by-side
irma/cmd/session.go
View file @
adbaa4c0
...
...
@@ -2,6 +2,7 @@ package cmd
import
(
"fmt"
prefixed
"github.com/x-cray/logrus-prefixed-formatter"
"net/http"
"regexp"
"strconv"
...
...
@@ -13,7 +14,6 @@ import (
"github.com/privacybydesign/irmago/server/irmaserver"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/x-cray/logrus-prefixed-formatter"
)
const
pollInterval
=
1000
*
time
.
Millisecond
...
...
@@ -215,9 +215,7 @@ func configureServer(url string, port int, privatekeysPath string, irmaconfig *i
func
configure
(
cmd
*
cobra
.
Command
)
(
irma
.
RequestorRequest
,
*
irma
.
Configuration
,
error
)
{
verbosity
,
_
:=
cmd
.
Flags
()
.
GetCount
(
"verbose"
)
logger
=
logrus
.
New
()
logger
.
Level
=
server
.
Verbosity
(
verbosity
)
logger
.
Formatter
=
&
prefixed
.
TextFormatter
{
FullTimestamp
:
true
}
irma
.
Logger
=
logger
return
configureRequest
(
cmd
)
...
...
@@ -226,6 +224,9 @@ func configure(cmd *cobra.Command) (irma.RequestorRequest, *irma.Configuration,
func
init
()
{
RootCmd
.
AddCommand
(
sessionCmd
)
logger
=
logrus
.
New
()
logger
.
Formatter
=
&
prefixed
.
TextFormatter
{
FullTimestamp
:
true
}
var
err
error
defaulturl
,
err
=
server
.
LocalIP
()
if
err
!=
nil
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment