Updating server dependancies. Also adding github.com/jaytaylor/html2text and gopkg.in/gomail.v2 (#5748)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3ada7a41a7
Коммит
c281ee3b61
16
vendor/github.com/lib/pq/ssl_permissions.go
сгенерированный
поставляемый
16
vendor/github.com/lib/pq/ssl_permissions.go
сгенерированный
поставляемый
@@ -4,13 +4,17 @@ package pq
|
||||
|
||||
import "os"
|
||||
|
||||
// sslCertificatePermissions checks the permissions on user-supplied certificate
|
||||
// files. The key file should have very little access.
|
||||
// sslKeyPermissions checks the permissions on user-supplied ssl key files.
|
||||
// The key file should have very little access.
|
||||
//
|
||||
// libpq does not check key file permissions on Windows.
|
||||
func sslCertificatePermissions(cert, key os.FileInfo) {
|
||||
kmode := key.Mode()
|
||||
if kmode != kmode&0600 {
|
||||
panic(ErrSSLKeyHasWorldPermissions)
|
||||
func sslKeyPermissions(sslkey string) error {
|
||||
info, err := os.Stat(sslkey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if info.Mode().Perm()&0077 != 0 {
|
||||
return ErrSSLKeyHasWorldPermissions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user