fix(git): ::/96 in SSRF-BlockList, URL-Tests für IPv6-Literale, ESLint no-nested-ternary
Re-Review PR #19: IPv4-kompatible Adressen (::7f00:1) fehlten in der BlockList, CI scheiterte an einem verschachtelten Ternary in editorPage.jsx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
de3f157e18
commit
7e638ec8a1
3 files changed
+10
-4
No files matched your search
@@ -24,11 +24,12 @@ const blocked = new net.BlockList();
|
||||
['172.16.0.0', 12], ['192.0.0.0', 24], ['192.168.0.0', 16], ['198.18.0.0', 15], ['224.0.0.0', 3]
|
||||
].forEach(([n, p])=>blocked.addSubnet(n, p, 'ipv4'));
|
||||
[
|
||||
['::', 128], ['::1', 128], ['fc00::', 7], ['fe80::', 10], ['ff00::', 8],
|
||||
// IPv4-gemappte Adressen (::ffff:a.b.c.d / ::ffff:a9fe:a9fe) prüft BlockList selbst gegen die IPv4-Regeln
|
||||
['::', 96], // IPv4-kompatibel (::a.b.c.d), schließt :: und ::1 ein
|
||||
['::1', 128], ['fc00::', 7], ['fe80::', 10], ['ff00::', 8],
|
||||
['64:ff9b::', 96], // NAT64
|
||||
['2002::', 16] // 6to4
|
||||
].forEach(([n, p])=>blocked.addSubnet(n, p, 'ipv6'));
|
||||
// IPv4-gemappte Adressen (::ffff:a.b.c.d, auch als ::ffff:7f00:1) prüft BlockList selbst gegen die IPv4-Regeln.
|
||||
|
||||
export const isPrivateAddress = (address)=>{
|
||||
const ip = String(address).toLowerCase().replace(/^\[|\]$/g, '').split('%')[0];
|
||||
|
||||
Reference in new issue
Block a user