-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added special char trimming for ssl and updated help texts #3724
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,7 +226,11 @@ function Trim-Inputs([ref]$siteName, [ref]$physicalPath, [ref]$poolName, [ref]$v | |
} | ||
if ($sslCertThumbPrint -ne $null) | ||
{ | ||
$sslCertThumbPrint.Value = $sslCertThumbPrint.Value.Trim() | ||
# Trim all non-hexadecimal characters from the ssl cetificate thumbprint | ||
Write-Warning (Get-VstsLocString -Key "SSLCertWarningInvalidCharacters") | ||
$sslCertThumbprint.Value = [Regex]::Replace($sslCertThumbprint.Value, "[^a-fA-F0-9]+" , "") | ||
$sslCertThumbprintValue = $sslCertThumbprint.Value | ||
Write-Host "##vso[task.setvariable variable=sslCertThumbprint;isSecret=true]$sslCertThumbprintValue" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the variable name may collide. How about using a GUID? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a comment to convey the intent |
||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
"version": { | ||
"Major": 0, | ||
"Minor": 2, | ||
"Patch": 0 | ||
"Patch": 1 | ||
}, | ||
"minimumAgentVersion": "2.111.0", | ||
"instanceNameFormat": "Manage $(IISDeploymentType)", | ||
|
@@ -153,7 +153,7 @@ | |
"groupName": "Website", | ||
"defaultValue": "", | ||
"visibleRule": "WebsitePhysicalPathAuth = WebsiteWindowsAuth", | ||
"helpMarkDown": "Provide the user's password that will be used to access the website's physical path." | ||
"helpMarkDown": "Provide the user's password that will be used to access the website's physical path. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. <br> Note: Special characters in password are interpreted as per <a href=\"https://go.microsoft.com/fwlink/?linkid=843470\">command-line arguments</a>" | ||
}, | ||
{ | ||
"name": "AddBinding", | ||
|
@@ -326,7 +326,7 @@ | |
"defaultValue": "", | ||
"required": false, | ||
"groupName": "ApplicationPoolForWebsite", | ||
"helpMarkDown": "Provide the password for custom account. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. ", | ||
"helpMarkDown": "Provide the password for custom account. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. <br> Note: Special characters in password are interpreted as per <a href=\"https://go.microsoft.com/fwlink/?linkid=843470\">command-line arguments</a>", | ||
"visibleRule": "AppPoolIdentityForWebsite = SpecificUser" | ||
}, | ||
{ | ||
|
@@ -385,7 +385,7 @@ | |
"required": false, | ||
"defaultValue": "", | ||
"visibleRule": "VDPhysicalPathAuth = VDWindowsAuth", | ||
"helpMarkDown": "Provide the user's password that will be used to access the virtual directory's physical path." | ||
"helpMarkDown": "Provide the user's password that will be used to access the virtual directory's physical path. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. <br> Note: Special characters in password are interpreted as per <a href=\"https://go.microsoft.com/fwlink/?linkid=843470\">command-line arguments</a>" | ||
}, | ||
{ | ||
"name": "ParentWebsiteNameForApplication", | ||
|
@@ -443,7 +443,7 @@ | |
"required": false, | ||
"defaultValue": "", | ||
"visibleRule": "ApplicationPhysicalPathAuth = ApplicationWindowsAuth", | ||
"helpMarkDown": "Provide the user's password that will be used to access the application's physical path." | ||
"helpMarkDown": "Provide the user's password that will be used to access the application's physical path. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. <br> Note: Special characters in password are interpreted as per <a href=\"https://go.microsoft.com/fwlink/?linkid=843470\">command-line arguments</a>" | ||
}, | ||
{ | ||
"name": "CreateOrUpdateAppPoolForApplication", | ||
|
@@ -524,7 +524,7 @@ | |
"required": false, | ||
"groupName": "ApplicationPoolForApplication", | ||
"visibleRule": "AppPoolIdentityForApplication = SpecificUser", | ||
"helpMarkDown": "Provide the password for custom account. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'." | ||
"helpMarkDown": "Provide the password for custom account. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. <br> Note: Special characters in password are interpreted as per <a href=\"https://go.microsoft.com/fwlink/?linkid=843470\">command-line arguments</a>" | ||
}, | ||
{ | ||
"name": "AppPoolName", | ||
|
@@ -596,7 +596,7 @@ | |
"required": false, | ||
"groupName": "ApplicationPool", | ||
"visibleRule": "AppPoolIdentity = SpecificUser", | ||
"helpMarkDown": "Provide the password for custom account. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'." | ||
"helpMarkDown": "Provide the password for custom account. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. <br> Note: Special characters in password are interpreted as per <a href=\"https://go.microsoft.com/fwlink/?linkid=843470\">command-line arguments</a>" | ||
}, | ||
{ | ||
"name": "StartStopRecycleAppPoolName", | ||
|
@@ -627,7 +627,8 @@ | |
"InvalidVirtualPath": "Virtual path should begin with a /", | ||
"InvalidIISDeploymentType": "Invalid IIS Deployment Type : {0}", | ||
"InvalidActionIISWebsite": "Invalid action '{0}' selected for the IIS Website.", | ||
"InvalidActionIISAppPool": "Invalid action '{0}' selected for the IIS Application Pool." | ||
"InvalidActionIISAppPool": "Invalid action '{0}' selected for the IIS Application Pool.", | ||
"SSLCertWarningInvalidCharacters": "SSL Certificate thumbprint contains non-hexadecimal characters. Trimming all non-hexadecimal characters." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it will be good to add a forward link to documentation here and help-markdown https://msdn.microsoft.com/en-us/library/windows/desktop/cc307220(v=vs.85).aspx |
||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write warning only when there are non-hexadecimal characters