Feature: Use allowed_hosts when creating listening socket

This commit is contained in:
Cory Sanin 2021-02-06 09:47:56 -06:00 committed by GitHub
parent fe70cf26a7
commit 456202b0f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@
- Feature: [#13614] Add terrain surfaces from RollerCoaster Tycoon 1.
- Feature: [#13675] [Plugin] Add context.setInterval and context.setTimeout.
- Feature: [#13927] [Plugin] Add isVisible and text box widget.
- Feature: [#14002] [Plugin] Feature: Use allowed_hosts when checking the binding IP for listening
- Change: [#13346] [Plugin] Renamed FootpathScenery to FootpathAddition, fix typos.
- Change: [#13857] Change Rotation Control Toggle to track element number 256
- Fix: [#4605, #11912] Water palettes are not updated properly when selected in Object Selection.

View File

@ -2141,7 +2141,7 @@ declare global {
interface Listener {
readonly listening: boolean;
listen(port: number): Listener;
listen(port: number, host?: string): Listener;
close(): Listener;
on(event: 'connection', callback: (socket: Socket) => void): Listener;

View File

@ -439,7 +439,7 @@ namespace OpenRCT2::Scripting
if (dukHost.type() == DukValue::Type::STRING)
{
auto host = dukHost.as_string();
if (IsLocalhostAddress(host))
if (IsLocalhostAddress(host) || IsOnWhiteList(host))
{
try
{