Details
Description
v4.0
This regex:
^[a-zA-Z0-9\-\_'\s]+$
|
used in ...
./lib/puppet/type/iis_application.rb (:applicationpool)
./lib/puppet/type/iis_application_pool.rb (:name)
./lib/puppet/type/iis_site.rb (:name)
is more restrictive than IIS itself, preventing the management of resources containing non-matching characters.
PS C:\Users\Administrator> New-WebSite -Name "Test.Site" -Port 80 -HostHeader "Test" -PhysicalPath "c:\"
|
|
Name ID State Physical Path Bindings
|
---- -- ----- ------------- --------
|
Test.Site 2310 Started c:\ http *:80:Test
|
Also, the associated fail commands interpolate the wrong variable (here, name instead of value) ...
newparam(:name, :namevar => true) do
|
desc "The Name of the IIS site. Used for uniqueness. Will set the target to this value if target is unset."
|
|
validate do |value|
|
if value.nil? or value.empty?
|
raise ArgumentError, "A non-empty name must be specified."
|
end
|
fail("#{name} is not a valid web site name") unless value =~ /^[a-zA-Z0-9\-\_'\s]+$/
|
end
|
end
|
Error: Failed to apply catalog: Parameter name failed on Iis_site[test.site]: name is not a valid web site name at ...
|
Attachments
Issue Links
- duplicates
-
MODULES-5443 IIS : iis_site does not allow names with valid characters
-
- Resolved
-
- relates to
-
MODULES-5626 IIS : Add Name validation for IIS Application Pools
-
- Resolved
-
-
MODULES-5627 IIS : Add Name validation for IIS Applications
-
- Resolved
-
-
MODULES-6069 IIS : iis_site applicationpool does not allow valid characters
-
- Resolved
-