Skip to content

Commit

Permalink
[dotnet] Correct ChromiumDriverService.AllowedIPAddresses property …
Browse files Browse the repository at this point in the history
…name (#13626)
  • Loading branch information
YevgeniyShunevych committed Feb 26, 2024
1 parent 2418844 commit da62a40
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions dotnet/src/webdriver/Chromium/ChromiumDriverService.cs
Expand Up @@ -19,7 +19,6 @@
using System;
using System.Globalization;
using System.Text;
using OpenQA.Selenium.Internal;

namespace OpenQA.Selenium.Chromium
{
Expand All @@ -33,7 +32,7 @@ public abstract class ChromiumDriverService : DriverService
private string logPath = string.Empty;
private string urlPathPrefix = string.Empty;
private string portServerAddress = string.Empty;
private string allowedIpAddresses = string.Empty;
private string allowedIPAddresses = string.Empty;
private int adbPort = -1;
private bool disableBuildCheck;
private bool enableVerboseLogging;
Expand Down Expand Up @@ -122,22 +121,22 @@ public bool EnableAppendLog
/// connect to this instance of the Chrome driver. Defaults to an empty string,
/// which means only the local loopback address can connect.
/// </summary>
[Obsolete("Use AllowedIpAddresses")]
public string WhitelistedIpAddresses
[Obsolete($"Use {nameof(AllowedIPAddresses)}")]
public string WhitelistedIPAddresses
{
get { return this.allowedIpAddresses; }
set { this.allowedIpAddresses = value; }
get { return this.allowedIPAddresses; }
set { this.allowedIPAddresses = value; }
}

/// <summary>
/// Gets or sets the comma-delimited list of IP addresses that are approved to
/// connect to this instance of the Chrome driver. Defaults to an empty string,
/// which means only the local loopback address can connect.
/// </summary>
public string AllowedIpAddresses
public string AllowedIPAddresses
{
get { return this.allowedIpAddresses; }
set { this.allowedIpAddresses = value; }
get => this.allowedIPAddresses;
set => this.allowedIPAddresses = value;
}

/// <summary>
Expand Down Expand Up @@ -188,9 +187,9 @@ protected override string CommandLineArguments
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --port-server={0}", this.portServerAddress);
}

if (!string.IsNullOrEmpty(this.allowedIpAddresses))
if (!string.IsNullOrEmpty(this.allowedIPAddresses))
{
argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " -allowed-ips={0}", this.allowedIpAddresses));
argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " -allowed-ips={0}", this.allowedIPAddresses));
}

return argsBuilder.ToString();
Expand Down

0 comments on commit da62a40

Please sign in to comment.