mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 12:28:01 +08:00
Upgraded build pipeline
Go version changed to 1.14.4 Golangci-lint changed to 1.26.0 Bazel version changed to 3.0.0 Bazel rules_go version changed to 0.23.3 Bazel gazelle version changed to v0.21.0 Bazel build tools version changed to 0.25.1 Bazel skylib version changed to 1.0.2
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
@@ -20,6 +19,7 @@ import (
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"github.com/anuvu/zot/errors"
|
||||
"github.com/anuvu/zot/pkg/api"
|
||||
"github.com/chartmuseum/auth"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
@@ -66,7 +66,7 @@ func makeHtpasswdFile() string {
|
||||
|
||||
// bcrypt(username="test", passwd="test")
|
||||
content := []byte("test:$2y$05$hlbSXDp6hzDLu6VwACS39ORvVRpr3OMR4RlJ31jtlaOEGnPjKZI1m\n")
|
||||
if err := ioutil.WriteFile(f.Name(), content, 0644); err != nil {
|
||||
if err := ioutil.WriteFile(f.Name(), content, 0600); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ func makeHtpasswdFileFromString(fileContent string) string {
|
||||
|
||||
// bcrypt(username="test", passwd="test")
|
||||
content := []byte(fileContent)
|
||||
if err := ioutil.WriteFile(f.Name(), content, 0644); err != nil {
|
||||
if err := ioutil.WriteFile(f.Name(), content, 0600); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ func (l *testLDAPServer) Stop() {
|
||||
|
||||
func (l *testLDAPServer) Bind(bindDN, bindSimplePw string, conn net.Conn) (vldap.LDAPResultCode, error) {
|
||||
if bindDN == "" || bindSimplePw == "" {
|
||||
return vldap.LDAPResultInappropriateAuthentication, errors.New("ldap: bind creds required")
|
||||
return vldap.LDAPResultInappropriateAuthentication, errors.ErrRequireCred
|
||||
}
|
||||
|
||||
if (bindDN == LDAPBindDN && bindSimplePw == LDAPBindPassword) ||
|
||||
@@ -943,7 +943,7 @@ func (l *testLDAPServer) Bind(bindDN, bindSimplePw string, conn net.Conn) (vldap
|
||||
return vldap.LDAPResultSuccess, nil
|
||||
}
|
||||
|
||||
return vldap.LDAPResultInvalidCredentials, errors.New("ldap: invalid credentials")
|
||||
return vldap.LDAPResultInvalidCredentials, errors.ErrInvalidCred
|
||||
}
|
||||
|
||||
func (l *testLDAPServer) Search(boundDN string, req vldap.SearchRequest,
|
||||
|
||||
Reference in New Issue
Block a user