update base64 regex for pub key

This commit is contained in:
viktorbarzin 2021-03-25 22:51:54 +00:00
parent df4c297097
commit c4465b9425
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ var (
func main() {
err := run()
if err != nil {
glog.Fatalf("run failed: %s", err.Error())
glog.Errorf("run failed: %s", err.Error())
}
}

View file

@ -22,7 +22,7 @@ const (
var (
allowedClientName = regexp.MustCompile(`^[a-zA-Z0-9 ]+$`)
allowedPubKey = regexp.MustCompile(`^[a-zA-Z0-9=]+$`)
allowedPubKey = regexp.MustCompile(`^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$`)
)
// addVPNClient inserts new client config