You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InvalidArgument: Only alphanumeric characters are supported in StorageAccountName param. And length should be less than 24 characters
Found that using all numbers resulted in no issues. SO I looked intot he code to detemrine why this was the case. Found out that uppercase letters were what prevented function of the script.
On this line the RegEx being used only accounts for lowercase letters. Either the script should convert all inputs to lowercase or the regex should accept both uppercase and lowercase letters as such:
$storageRegEx = [regex]"^[A-Za-z0-9]{3,24}$"
The text was updated successfully, but these errors were encountered:
njohnso
changed the title
RegEx results in erroneous message about Only Alphanumeric characters are allowed.
Install-AzSKOrganizationPolicy results in erroneous message about Only Alphanumeric characters are allowed.
Mar 5, 2020
Error Received when running the command is:
InvalidArgument: Only alphanumeric characters are supported in StorageAccountName param. And length should be less than 24 characters
Found that using all numbers resulted in no issues. SO I looked intot he code to detemrine why this was the case. Found out that uppercase letters were what prevented function of the script.
DevOpsKit/src/AzSK/Framework/Core/PolicySetup/PolicySetup.ps1
Line 103 in ce5e1c5
On this line the RegEx being used only accounts for lowercase letters. Either the script should convert all inputs to lowercase or the regex should accept both uppercase and lowercase letters as such:
$storageRegEx = [regex]"^[A-Za-z0-9]{3,24}$"
The text was updated successfully, but these errors were encountered: