aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Core/Options.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index a1d9953c..68fa4d92 100644
--- a/src/slskd/Core/Options.cs
+++ b/src/slskd/Core/Options.cs
@@ -648,6 +648,11 @@ namespace slskd
{
try
{
+ if (cidr.StartsWith("::ffff", StringComparison.OrdinalIgnoreCase))
+ {
+ throw new Exception("IPv4 mapped IPv6 addresses are not allowed");
+ }
+
_ = IPAddressRange.Parse(cidr);
}
catch (Exception ex)
@@ -1116,6 +1121,11 @@ namespace slskd
{
try
{
+ if (cidr.StartsWith("::ffff", StringComparison.OrdinalIgnoreCase))
+ {
+ throw new Exception("IPv4 mapped IPv6 addresses are not allowed");
+ }
+
_ = IPAddressRange.Parse(cidr);
}
catch (Exception ex)
@@ -2013,6 +2023,11 @@ namespace slskd
{
try
{
+ if (cidr.StartsWith("::ffff", StringComparison.OrdinalIgnoreCase))
+ {
+ throw new Exception("IPv4 mapped IPv6 addresses are not allowed");
+ }
+
_ = IPAddressRange.Parse(cidr);
}
catch (Exception ex)
@@ -2096,6 +2111,11 @@ namespace slskd
{
try
{
+ if (cidr.StartsWith("::ffff", StringComparison.OrdinalIgnoreCase))
+ {
+ throw new Exception("IPv4 mapped IPv6 addresses are not allowed");
+ }
+
_ = IPAddressRange.Parse(cidr);
}
catch (Exception ex)