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

UserManagementService .CreateUser replaces ' ' with '+' #89

Closed
FinkoAI opened this issue Oct 10, 2019 · 3 comments
Closed

UserManagementService .CreateUser replaces ' ' with '+' #89

FinkoAI opened this issue Oct 10, 2019 · 3 comments
Assignees

Comments

@FinkoAI
Copy link

FinkoAI commented Oct 10, 2019

Expected behavior

We are using UserManagementService .CreateUser (https://github.com/JetBrains/YouTrackSharp/blob/192/src/YouTrackSharp/Management/UserManagementService.cs#L86) for users creating in our library. In case of sending full name like "FirstName LastName" it should create user with the full name equals "FirstName LastName"

Actual behavior

Actually it works wrong and saves it as string "FirstName+LastName". Probably the reason is WebUtilities.UrlEncode on fullName string (this helper replaces ' ' character with the '+' character).

Also, I think this problem is actual for all POST/PUT requests.

Steps to reproduce the behavior

You can just call UserManagementService .CreateUser with FullName parameter that contains spaces.

@FinkoAI FinkoAI changed the title UserManagementService .CreateUser replaces ' ' with '' UserManagementService .CreateUser replaces ' ' with '+' Oct 10, 2019
@maartenba maartenba self-assigned this Oct 10, 2019
@maartenba
Copy link
Contributor

Fresh package has been uploaded to NuGet, should be visible there shortly.

@FinkoAI
Copy link
Author

FinkoAI commented Oct 10, 2019

@maartenba Thanks for the quick fix.

@FinkoAI
Copy link
Author

FinkoAI commented Oct 14, 2019

@maartenba We have checked the fix. And there is another issue now. Is replaces ' ' character with the '%20'. I guess FormData shouldn't be escaped and it could be passed as is.

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

No branches or pull requests

2 participants