1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 21:18:13 -05:00

add ::ffff: to internal ip check (#1701)

* add ::ffff: to internal ip check

* check StartsWith
This commit is contained in:
Kyle Spearrin 2021-11-09 11:16:54 -05:00 committed by GitHub
parent fd37cb5a12
commit 9582e94232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,6 @@ using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
using Bit.Icons.Models; using Bit.Icons.Models;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System.Text.RegularExpressions;
using System.Text; using System.Text;
using AngleSharp.Html.Parser; using AngleSharp.Html.Parser;
@ -428,7 +427,7 @@ namespace Bit.Icons.Services
} }
var ipString = ip.ToString(); var ipString = ip.ToString();
if (ipString == "::1" || ipString == "::") if (ipString == "::1" || ipString == "::" || ipString.StartsWith("::ffff:"))
{ {
return true; return true;
} }