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

Renaming the group to = character in between a string makes the group disappear #5968

Closed
SwikritiT opened this issue Mar 30, 2023 · 2 comments
Labels

Comments

@SwikritiT
Copy link
Contributor

SwikritiT commented Mar 30, 2023

Describe the bug

Renaming the group to = character in between a string makes the group disappear

Steps to reproduce

  1. create a group grp1
curl -XPOST "https://localhost:9200/graph/v1.0/groups" -d'{"displayName":"grp1"}' -uadmin:admin -vk
  1. Rename the group to something with = at somewhere between other characters like grp=1
curl -XPATCH "https://localhost:9200/graph/v1.0/groups/<group-id>" \     
-d'{"displayName": "grp=1"}' -uadmin:admin -vk

Note group id can be obtained from the response of POST request or curl "https://localhost:9200/graph/v1.0/groups" -uadmin:admin -vk

  1. The request is successful with 204
  2. Now get the group
curl "https://localhost:9200/graph/v1.0/groups" -uadmin:admin -vk

Expected behavior

As the rename was "successful", there should be a group with name grp=1

Actual behavior

The group is not in response to the get request. Nor is it in the UI. But if resend the same request again

curl -XPATCH "https://localhost:9200/graph/v1.0/groups/792015d3-9b6c-4bb3-9147-e2114033bc37" \     
-d'{"displayName": "grp=1"}' -uadmin:admin -vk

I get a 409 conflict

< HTTP/1.1 409 Conflict
< Content-Length: 178
< Content-Type: application/json; charset=utf-8
< Date: Thu, 30 Mar 2023 10:19:09 GMT
< X-Graph-Version: 3.0.0-alpha.1+182c375d2
< 
{"error":{"code":"nameAlreadyExists","innererror":{"date":"2023-03-30T10:19:09Z","request-id":"swikriti-OptiPlex-3070/3oZtTCUzA1-001106"},"message":"Group name already in use"}}
* Connection #0 to host localhost left intact

But when I get it it's not there

curl "https://localhost:9200/graph/v1.0/groups" -uadmin:admin -vk  
{"value":[{"displayName":"users","id":"509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"},{"displayName":"sailing-lovers","id":"6040aa17-9c64-4fef-9bd0-77234d71bad0"},{"displayName":"violin-haters","id":"dd58e5ec-842e-498b-8800-61f2ec6f911f"},{"displayName":"radium-lovers","id":"7b87fd49-286e-4a5f-bafd-c535d5dd997a"},{"displayName":"polonium-lovers","id":"cedc21aa-4072-4614-8676-fa9165f598ff"},{"displayName":"quantum-lovers","id":"a1726108-01f8-4c30-88df-2b1a9d1cba1a"},{"displayName":"philosophy-haters","id":"167cbee2-0518-455a-bfb2-031fe0621e5d"},{"displayName":"physics-lovers","id":"262982c1-2362-4afa-bfdf-8cbfef64a06e"}]}

But if i rename it to something without = character in it. It gets shown again

Setup

OCIS_COMMIT_ID= 182c375

@SwikritiT
Copy link
Contributor Author

Note that issues #5966 #5970 #5969 might be related. I created them separately as behaviors weren't the same

@kobergj
Copy link
Collaborator

kobergj commented Mar 30, 2023

It's correct that the behaviour is different so creating a second issue was right 👍

Although in this case the underlying issue is the same. So I am closing this in favor of #5966

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants