Fixed all high and medium security issues from gosec

This commit is contained in:
2025-01-07 19:02:14 +02:00
parent 4c2672b497
commit 4e2ca64319
8 changed files with 16 additions and 14 deletions

View File

@@ -43,6 +43,7 @@ func init() {
tlsConfig = &tls.Config{
Certificates: []tls.Certificate{cert},
MinVersion: tls.VersionTLS12,
}
}
@@ -179,7 +180,7 @@ func (server *server) handleConnection(conn net.Conn) {
// Write ID back, it's useful for the client to know, and signals successful authentication
var id [8]byte
binary.BigEndian.PutUint64(id[:], uint64(user.ID))
binary.BigEndian.PutUint64(id[:], uint64(user.ID)) // #nosec G115 -- sign bit is always 0 in snowflake IDs
_, err = conn.Write(id[:])
if err != nil {
initialCancel()