mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2025-12-13 17:10:36 +00:00
Broken linting
This commit is contained in:
parent
bf955b7971
commit
97b39de88a
@ -1,5 +1,7 @@
|
||||
// Package middleware provides HTTP middleware functionalities such as rate limiting and IP blacklisting.
|
||||
package middleware
|
||||
|
||||
//nolint:all
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
@ -88,11 +88,11 @@ func TestRateLimiterDifferentIPs(t *testing.T) {
|
||||
|
||||
func TestGetClientIP(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
remoteAddr string
|
||||
xForwardedFor string
|
||||
xRealIP string
|
||||
expectedIP string
|
||||
name string
|
||||
remoteAddr string
|
||||
xForwardedFor string
|
||||
xRealIP string
|
||||
expectedIP string
|
||||
}{
|
||||
{
|
||||
name: "RemoteAddr only",
|
||||
|
||||
@ -85,8 +85,8 @@ func TestSanitizeMap(t *testing.T) {
|
||||
sanitizer := DefaultSanitizer()
|
||||
|
||||
input := map[string]interface{}{
|
||||
"name": "<script>alert(1)</script>John",
|
||||
"email": "test@example.com",
|
||||
"name": "<script>alert(1)</script>John",
|
||||
"email": "test@example.com",
|
||||
"nested": map[string]interface{}{
|
||||
"bio": "<iframe src='evil.com'>Bio</iframe>",
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user