Skip to content
Closed

- #1255

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Server/Components/CustomModels/models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,16 @@ class WebServer
return httplib::Server::HandlerResponse::Handled;
}
}
else if (req.sockaddr.ss_family == AF_INET6)
else
{
// TODO: Add IPV6 support.
// The allowlist only holds the IPv4 addresses of connected players
// (see allowIPAddress), so a request from any other address family
// (IPv6 included) can never be on it. Until IPv6 allowlisting is
// implemented we deny those requests instead of letting them through
// unchecked, otherwise the player-IP restriction is trivially bypassed
// by downloading the models over IPv6.
res.status = 401;
return httplib::Server::HandlerResponse::Handled;
}

return httplib::Server::HandlerResponse::Unhandled;
Expand Down