mirror of https://github.com/cbeuw/Cloak
Mitigation for https://github.com/cbeuw/Cloak-android/issues/13
This commit is contained in:
parent
f63fea14ee
commit
6bd2e8fe1e
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/cbeuw/Cloak/internal/common"
|
"github.com/cbeuw/Cloak/internal/common"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -85,6 +86,10 @@ func ssvToJson(ssv string) (ret []byte) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
sp := strings.SplitN(ln, "=", 2)
|
sp := strings.SplitN(ln, "=", 2)
|
||||||
|
if len(sp) < 2 {
|
||||||
|
log.Errorf("Malformed config option: %v", ln)
|
||||||
|
continue
|
||||||
|
}
|
||||||
key := sp[0]
|
key := sp[0]
|
||||||
value := sp[1]
|
value := sp[1]
|
||||||
// JSON doesn't like quotation marks around int and bool
|
// JSON doesn't like quotation marks around int and bool
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue