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
|
package middleware
|
||||||
|
|
||||||
|
//nolint:all
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|||||||
@ -88,11 +88,11 @@ func TestRateLimiterDifferentIPs(t *testing.T) {
|
|||||||
|
|
||||||
func TestGetClientIP(t *testing.T) {
|
func TestGetClientIP(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
remoteAddr string
|
remoteAddr string
|
||||||
xForwardedFor string
|
xForwardedFor string
|
||||||
xRealIP string
|
xRealIP string
|
||||||
expectedIP string
|
expectedIP string
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "RemoteAddr only",
|
name: "RemoteAddr only",
|
||||||
|
|||||||
@ -85,8 +85,8 @@ func TestSanitizeMap(t *testing.T) {
|
|||||||
sanitizer := DefaultSanitizer()
|
sanitizer := DefaultSanitizer()
|
||||||
|
|
||||||
input := map[string]interface{}{
|
input := map[string]interface{}{
|
||||||
"name": "<script>alert(1)</script>John",
|
"name": "<script>alert(1)</script>John",
|
||||||
"email": "test@example.com",
|
"email": "test@example.com",
|
||||||
"nested": map[string]interface{}{
|
"nested": map[string]interface{}{
|
||||||
"bio": "<iframe src='evil.com'>Bio</iframe>",
|
"bio": "<iframe src='evil.com'>Bio</iframe>",
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user