Request: input sanitization on account name
1stewart opened this issue · 1 comments
Microsoft's Storage Accounts only support lowercase and numbers in names: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage
Supplying invalid values (accidentally since I missed the space!) results in attempting to use the value, instead of validating it before submitting, and the response 'Invalid account or key', though I think it'd be more user friendly if the account name box failed regex validation. There may be a reason to support other characters for custom domains, but since both requests are defaulting to the normal endpoints I think the logic could be split if there's a suffix.
Request URL: https://REDACTED.azurewebsites.net/api/Queues/GetQueues?account=fakename**%20**&key=fddfsfdsfdfd
{description: "System.UriFormatException: 'Invalid URI: The hostname could not be parsed.'",…}
description: "System.UriFormatException: 'Invalid URI: The hostname could not be parsed.'"
statusText: "Invalid URI: The hostname could not be parsed."
Request URL: https://REDACTED.azurewebsites.net/api/Queues/GetQueues?account=fakenaDDDD&key=fddfsfdsfdfd
{"description":"System.AggregateException: 'Retry failed after 6 tries. Retry settings can be adjusted in ClientOptions.Retry. (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443))'","statusText":"Retry failed after 6 tries. Retry settings can be adjusted in ClientOptions.Retry. (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443)) (Name or service not known (fakenadddd.queue.core.windows.net:443))"}