From b5b728bee3f4130c84ddd0b78521e91d593f97e3 Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Thu, 12 Apr 2018 15:12:39 +0800 Subject: [PATCH] Fix the vulnerability issues in the job service code 'Errors unhandled' in 'jobservice/job/impl/logger/job_logger.go' 'TLS InsecureSkipVerify set true' in 'jobservice/opm/hook_client.go' --- src/jobservice/job/impl/logger/job_logger.go | 2 +- src/jobservice/opm/hook_client.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/jobservice/job/impl/logger/job_logger.go b/src/jobservice/job/impl/logger/job_logger.go index 6d2cd3ad7..6ecdf45d2 100644 --- a/src/jobservice/job/impl/logger/job_logger.go +++ b/src/jobservice/job/impl/logger/job_logger.go @@ -34,7 +34,7 @@ func New(logPath string, level string) *JobLogger { //Implements logger.Closer interface func (jl *JobLogger) Close() error { if jl.streamRef != nil { - jl.streamRef.Close() + return jl.streamRef.Close() } return nil diff --git a/src/jobservice/opm/hook_client.go b/src/jobservice/opm/hook_client.go index 6527ee63d..a50fd03f2 100644 --- a/src/jobservice/opm/hook_client.go +++ b/src/jobservice/opm/hook_client.go @@ -3,7 +3,6 @@ package opm import ( - "crypto/tls" "encoding/json" "errors" "fmt" @@ -38,9 +37,6 @@ func NewHookClient() *HookClient { Transport: &http.Transport{ MaxIdleConns: maxIdleConnections, IdleConnTimeout: idleConnectionTimeout, - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: true, - }, }, }