mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-08 01:28:44 +00:00
Compare commits
8 Commits
Xe/adjust-
...
Xe/honeypo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15b0927c46 | ||
|
|
5e69031c10 | ||
|
|
9ccd5db528 | ||
|
|
82fca3e714 | ||
|
|
83c8c3606a | ||
|
|
958daba4a1 | ||
|
|
e0f4468b03 | ||
|
|
ade8505b26 |
@@ -134,10 +134,7 @@ bots:
|
||||
adjust: -5
|
||||
|
||||
- name: should-have-accept
|
||||
expression:
|
||||
all:
|
||||
- userAgent.contains("Mozilla")
|
||||
- '!("Accept" in headers)'
|
||||
expression: '!("Accept" in headers)'
|
||||
action: WEIGH
|
||||
weight:
|
||||
adjust: 5
|
||||
|
||||
@@ -118,10 +118,7 @@
|
||||
adjust: -5
|
||||
|
||||
- name: should-have-accept
|
||||
expression:
|
||||
all:
|
||||
- userAgent.contains("Mozilla")
|
||||
- '!("Accept" in headers)'
|
||||
expression: '!("Accept" in headers)'
|
||||
action: WEIGH
|
||||
weight:
|
||||
adjust: 5
|
||||
|
||||
@@ -27,7 +27,6 @@ Anubis is back and better than ever! Lots of minor fixes with some big ones inte
|
||||
- Add support to simple Valkey/Redis cluster mode
|
||||
- Open Graph passthrough now reuses the configured target Host/SNI/TLS settings, so metadata fetches succeed when the upstream certificate differs from the public domain. ([1283](https://github.com/TecharoHQ/anubis/pull/1283))
|
||||
- Stabilize the CVE-2025-24369 regression test by always submitting an invalid proof instead of relying on random POW failures.
|
||||
- Refine the check that ensures the presence of the Accept header to avoid breaking docker clients.
|
||||
|
||||
### Dataset poisoning
|
||||
|
||||
|
||||
@@ -100,9 +100,6 @@ func XForwardedForToXRealIP(next http.Handler) http.Handler {
|
||||
ip := xff.Parse(xffHeader)
|
||||
slog.Debug("setting X-Real-Ip from X-Forwarded-For", "to", ip, "x-forwarded-for", xffHeader)
|
||||
r.Header.Set("X-Real-Ip", ip)
|
||||
if addr, err := netip.ParseAddr(ip); err == nil {
|
||||
r = r.WithContext(context.WithValue(r.Context(), realIPKey{}, addr))
|
||||
}
|
||||
}
|
||||
|
||||
next.ServeHTTP(w, r)
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"log/slog"
|
||||
"math/rand/v2"
|
||||
"net/http"
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
"github.com/TecharoHQ/anubis/internal"
|
||||
@@ -153,7 +152,9 @@ func (i *Impl) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
realIP, _ := internal.RealIP(r)
|
||||
if !realIP.IsValid() {
|
||||
realIP = netip.MustParseAddr(r.Header.Get("X-Real-Ip"))
|
||||
lg.Error("the real IP is somehow invalid, bad middleware stack?")
|
||||
http.Error(w, "The cake is a lie", http.StatusTeapot)
|
||||
return
|
||||
}
|
||||
|
||||
network, ok := internal.ClampIP(realIP)
|
||||
|
||||
Reference in New Issue
Block a user