Showing 1 of 1 files from the diff.

@@ -5,6 +5,7 @@
Loading
5 5
package gin
6 6
7 7
import (
8 +
	"crypto/subtle"
8 9
	"encoding/base64"
9 10
	"net/http"
10 11
	"strconv"
@@ -30,7 +31,7 @@
Loading
30 31
		return "", false
31 32
	}
32 33
	for _, pair := range a {
33 -
		if pair.value == authValue {
34 +
		if subtle.ConstantTimeCompare([]byte(pair.value), []byte(authValue)) == 1 {
34 35
			return pair.user, true
35 36
		}
36 37
	}
Files Coverage
binding 100.00%
render 92.96%
auth.go 100.00%
context.go 97.51%
debug.go 100.00%
deprecated.go 100.00%
errors.go 100.00%
fs.go 100.00%
gin.go 99.01%
logger.go 100.00%
mode.go 100.00%
path.go 100.00%
recovery.go 97.18%
response_writer.go 93.33%
routergroup.go 100.00%
test_helpers.go 100.00%
tree.go 100.00%
utils.go 96.83%
Project Totals (41 files) 98.64%
4857.3
1.13.x=.13.x
TRAVIS_OS_NAME=linux
4857.2
1.13.x=.13.x
TRAVIS_OS_NAME=linux
4857.4
1.14.x=.14.x
TRAVIS_OS_NAME=linux
4857.1
TRAVIS_OS_NAME=linux
1.12.x=.12.x
4856.5
1.14.x=.14.x
TRAVIS_OS_NAME=linux
4856.6
TRAVIS_OS_NAME=linux
1.15.x=.15.x
4856.7
TRAVIS_OS_NAME=linux
1.15.x=.15.x
4856.8
TRAVIS_OS_NAME=linux
master=
4857.6
TRAVIS_OS_NAME=linux
1.15.x=.15.x
4857.5
1.14.x=.14.x
TRAVIS_OS_NAME=linux
4852.4
1.14.x=.14.x
TRAVIS_OS_NAME=linux
4852.6
TRAVIS_OS_NAME=linux
1.15.x=.15.x
4853.2
1.13.x=.13.x
TRAVIS_OS_NAME=linux
4862.5
1.14.x=.14.x
TRAVIS_OS_NAME=linux
4862.1
TRAVIS_OS_NAME=linux
1.12.x=.12.x
4862.2
1.13.x=.13.x
TRAVIS_OS_NAME=linux
4861.8
TRAVIS_OS_NAME=linux
master=
4862.3
1.13.x=.13.x
TRAVIS_OS_NAME=linux
4862.4
1.14.x=.14.x
TRAVIS_OS_NAME=linux
4861.6
TRAVIS_OS_NAME=linux
1.15.x=.15.x