Skip to content

Conversation

@cquirosj
Copy link
Contributor

@cquirosj cquirosj commented Dec 23, 2025

Fix hostname validation in SCMU

Summary

Along with

this PR fixes

This PR completes the fix for issue #5190 by adding proper hostname validation to Service Control Management Utility (SCMU). While PR #5238 partially addressed the issue by allowing dashes in hostnames, it didn't implement comprehensive hostname validation, leaving users able to enter invalid hostnames that would cause configuration issues.

Background

Original Issue: #5190 reported that ServiceControl.Config blocked typing dashes but lacked validation of hostname fields, allowing users to enter invalid values that would cause runtime failures.

Previous Fix: PR #5238 addressed part of the problem by allowing dashes in hostnames, but the validation was still incomplete and didn't prevent other invalid hostname formats.

This Fix: Implements comprehensive RFC-compliant hostname validation using .NET's built-in Uri.CheckHostName() method.

Validation Behavior

The new validation accepts:

@cquirosj cquirosj added the Bug label Dec 23, 2025
@cquirosj cquirosj added this to the 6.8.1 milestone Dec 23, 2025
@cquirosj cquirosj requested a review from ramonsmits December 23, 2025 05:29
@cquirosj cquirosj marked this pull request as ready for review December 23, 2025 05:30
# Fix hostname validation in SCMU

## Summary

This PR completes the fix for issue #5190 by adding proper hostname validation to ServiceControl.Config. While PR #5238 partially addressed the issue by allowing dashes in hostnames, it didn't implement comprehensive hostname validation, leaving users able to enter invalid hostnames that would cause configuration issues.

## Background

**Original Issue**: #5190 reported that ServiceControl.Config was not properly validating hostname fields, allowing users to enter invalid values that would cause runtime failures.

**Previous Fix**: PR #5238 addressed part of the problem by allowing dashes in hostnames, but the validation was still incomplete and didn't prevent other invalid hostname formats.

**This Fix**: Implements comprehensive RFC-compliant hostname validation using .NET's built-in `Uri.CheckHostName()` method.

## Validation Behavior

The new validation accepts:
- ✅ Valid DNS hostnames (server01, myhost.domain.com)
- ✅ localhost
- ✅ Hostnames with dashes (server-01, my-host.domain.com) - *previously fixed by PR #5238*
@cquirosj cquirosj force-pushed the scmu-hostname-validator-bug-fix-5238 branch from e9d61c9 to 7db3347 Compare December 23, 2025 05:52
@cquirosj cquirosj force-pushed the scmu-hostname-validator-bug-fix-5238 branch from e836e0a to 8750593 Compare December 23, 2025 07:56
@cquirosj cquirosj force-pushed the scmu-hostname-validator-bug-fix-5238 branch from a6d8d13 to c886435 Compare December 23, 2025 08:43
…lidationTests.cs

Co-authored-by: Nick Gallegos <nick.gallegos@particular.net>
@cquirosj cquirosj enabled auto-merge (squash) December 24, 2025 01:53
@cquirosj cquirosj merged commit d7042a0 into master Dec 24, 2025
32 checks passed
@cquirosj cquirosj deleted the scmu-hostname-validator-bug-fix-5238 branch December 24, 2025 02:06
@cquirosj cquirosj changed the title # Fix hostname validation in SCMU Fix hostname validation in SCMU Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants