-
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
Conversation
@@ -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") |
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
@@ -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 comment
The 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
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment to convey the intent
No description provided.