Skip to content
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

postgresql API allows capitals & invalid chars in server name/returns incorrect casing. #6305

Closed
katbyte opened this issue Nov 8, 2019 · 9 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. PostgreSQL Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@katbyte
Copy link

katbyte commented Nov 8, 2019

Bug Report

[13:59:26] kt@katbook:~/hashi/tf/azure/azurerm▸postgres/casing$ cat go.mod | egrep "(autorest|Azure)"
	github.com/Azure/azure-sdk-for-go v35.0.0+incompatible
	github.com/Azure/go-autorest/autorest v0.9.2
	github.com/Azure/go-autorest/autorest/date v0.2.0
[13:59:33] kt@katbook:~/hashi/tf/azure/azurerm▸postgres/casing$ go version
go version go1.13.1 darwin/amd64
[14:01:21] kt@katbook:~/hashi/tf/azure/azurerm▸postgres/casing$ find azurerm -type f -print | xargs grep "postgresql\"$" | cut -d\" -f 2 | sort -u
github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql
  • What happened?
    the API accepts uppercase letters for sql server name but then returns the server name in all lowercase.
    put: https://management.azure.com/subscriptions/1a6092a6-137e-4025-9a7c-ef77f76f2c02/resourceGroups/acctestRG-postgres-191108135158564028/providers/Microsoft.DBforPostgreSQL/servers/acctest-PGSQL-server-191108135158564028?api-version=2017-12-01
    get: https://management.azure.com/subscriptions/1a6092a6-137e-4025-9a7c-ef77f76f2c02/resourceGroups/acctestRG-postgres-191108135158564028/providers/Microsoft.DBforPostgreSQL/servers/acctest-PGSQL-server-191108135158564028?api-version=2017-12-01
{
...
	"location": "westeurope",
	"tags": {},
	"id": "/subscriptions/1a6092a6-137e-4025-9a7c-ef77f76f2c02/resourceGroups/acctestRG-postgres-191108135158564028/providers/Microsoft.DBforPostgreSQL/servers/acctest-pgsql-server-191108135158564028",
	"name": "acctest-pgsql-server-191108135158564028",
	"type": "Microsoft.DBforPostgreSQL/servers"
}
  • What did you expect or want to happen?
    either the server name to be returned in the correct casing or an API error due to the uppercase characters.
  • How can we reproduce it?
  • Anything we should know about your environment.
@ArcturusZhang ArcturusZhang added customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. triage labels Nov 13, 2019
@ArcturusZhang ArcturusZhang added the Service Attention Workflow: This issue is responsible by Azure service team. label Nov 13, 2019
@ghost
Copy link

ghost commented Nov 13, 2019

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rachel-msft

@ghost
Copy link

ghost commented Nov 13, 2019

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jaredmoo

@ArcturusZhang
Copy link
Member

Hi @katbyte I have tagged this issue so the corresponding service team will have a look at this.

@rachel-msft rachel-msft self-assigned this Nov 13, 2019
@jaredmoo jaredmoo removed the SQL label Nov 23, 2019
@rachel-msft
Copy link

Thanks for reaching out @katbyte and providing details about this experience.

For this api, we request that lowercase format be used for inputting letters.
As it stands, we will continue to convert to lowercase format if that's not entered.

@tombuildsstuff
Copy link
Contributor

@rachel-msft thanks for confirming this is a bug - is there a timeline to fix this bug in the API?

@rachel-msft
Copy link

@tombuildsstuff I wasn't saying that it is a bug. The server name is expected to be lower case and converts other entries into this format. There isn't any change planned.

@katbyte
Copy link
Author

katbyte commented Dec 7, 2019

@rachel-msft, if the server name is expected to be lowercase the API should be validating and rejecting any server names that are not lowercase? this very much sounds like a bug that should fixed, storage accounts also can only be lower case and they reject any name that has capitals in it rather then silently changing a users input.

@katbyte katbyte changed the title postgresql API allows capitals in server name/returns incorrect casing. postgresql API allows capitals & invalid chars in server name/returns incorrect casing. Jan 20, 2020
@katbyte
Copy link
Author

katbyte commented Jan 20, 2020

@rachel-msft, it seems there is no validation on API inputs here at all. I have done a number of requests with invalid chars (#$!@) and the API just hangs.

@rachel-msft
Copy link

rachel-msft commented Jun 5, 2020

We haven't been able to receive the issue described with invalid chars. We get an error code and error when we attempted the chars you listed (#$!@). Closing this issue for now. Can reopen if repro steps are provided.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. PostgreSQL Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants