File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ var sensitiveKeys = []string{
2727 "creditcard" , // Credit card number
2828 "cvv" , // Card verification value
2929 "cvc" , // Card verification code
30- "eamil " , // Email address
30+ "email " , // Email address
3131 "phone" , // Phone number
3232 "address" , // Physical address
3333 "account" , // Bank account number
@@ -208,6 +208,8 @@ func (m *Middleware) redactQueryParams(queryParams string) string {
208208}
209209
210210func (m * Middleware ) isSensitiveQueryParamKey (key string ) bool {
211+ sensitiveKeysMutex .RLock ()
212+ defer sensitiveKeysMutex .RUnlock ()
211213 for _ , sensitiveKey := range sensitiveKeys { // Use package level sensitiveKeys variable
212214 if strings .Contains (key , sensitiveKey ) {
213215 return true
Original file line number Diff line number Diff line change @@ -298,6 +298,11 @@ func (t *CIDRTrie) containsIPv6(ip net.IP) bool {
298298 return false
299299 }
300300
301+ // Add this check to ensure ip is not empty
302+ if len (ip ) == 0 {
303+ return false
304+ }
305+
301306 node := t .ipv6Root
302307 for i := 0 ; i < len (ip )* 8 ; i ++ {
303308 bit := (ip [i / 8 ] >> (7 - uint (i % 8 ))) & 1
You can’t perform that action at this time.
0 commit comments