Skip to content

Commit e33af04

Browse files
authored
Fix: Allow dot as windows domain for local authentication (BornToBeRoot#2305)
* Fix: Allow dot as windows domain for local authentication * Docs: BornToBeRoot#2305
1 parent 497be0e commit e33af04

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

Source/NETworkManager.Validators/EmptyOrWindowsDomainValidator.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ public class EmptyOrWindowsDomainValidator : ValidationRule
1010
{
1111
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
1212
{
13-
if (string.IsNullOrEmpty(value as string))
13+
string domain = value as string;
14+
15+
if (string.IsNullOrEmpty(domain))
1416
return ValidationResult.ValidResult;
1517

16-
return Regex.IsMatch((string)value, RegexHelper.HostnameRegex) ? ValidationResult.ValidResult : new ValidationResult(false, Strings.EnterValidDomain);
18+
// For local authentication "." is a valid domain
19+
if (domain.Equals("."))
20+
return ValidationResult.ValidResult;
21+
22+
return Regex.IsMatch(domain, RegexHelper.HostnameRegex) ? ValidationResult.ValidResult : new ValidationResult(false, Strings.EnterValidDomain);
1723
}
1824
}

docs/Changelog/next-release.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ Breaking changes
3030

3131
- DNS Lookup
3232
- Improved validation when adding/changing DNS server profiles [#2282](https://github.com/BornToBeRoot/NETworkManager/pull/2282){:target="\_blank"}
33-
- SNTP Lookup
34-
- Improved validation when adding/changing SNTP server profiles [#2282](https://github.com/BornToBeRoot/NETworkManager/pull/2282){:target="\_blank"}
33+
- Remote Desktop
34+
- Allow `.` as domain to authenticate with local accounts [#2305](https://github.com/BornToBeRoot/NETworkManager/pull/2305){:target="\_blank"}
3535
- TigerVNC
3636
- Use port from default config instead of settings if creating a new group [#2249](https://github.com/BornToBeRoot/NETworkManager/pull/2249){:target="\_blank"}
37+
- SNTP Lookup
38+
- Improved validation when adding/changing SNTP server profiles [#2282](https://github.com/BornToBeRoot/NETworkManager/pull/2282){:target="\_blank"}
3739
- Wake on LAN
3840
- Change default port from 7 to 9 [#2242](https://github.com/BornToBeRoot/NETworkManager/pull/2242){:target="\_blank"}
3941

0 commit comments

Comments
 (0)