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

Prevent trailing slash for identifierUris when no path #928

Merged
merged 3 commits into from
Nov 17, 2022

Conversation

MarkDordoy
Copy link
Contributor

Using the Graph API, if you try and patch or create an application that has an IdentifierUris without a path and a trailing slash, the api will respond with:

ApplicationsClient.BaseClient.Patch(): unexpected status 400 with OData error: IdentifierUrisEndsWithSlash: Application alias 'https://mydomain.com/' value is invalid.

This PR Extends the function validate.IsUriFunc to have a new argument allowTrailingSlash and its set to false for IdentifierUris validation.

@github-actions github-actions bot added size/M and removed size/XS labels Nov 16, 2022
Copy link
Contributor

@manicminer manicminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @MarkDordoy, LGTM! 🥧

@manicminer manicminer added this to the v2.31.0 milestone Nov 17, 2022
@manicminer manicminer merged commit 801ce56 into hashicorp:main Nov 17, 2022
manicminer added a commit that referenced this pull request Nov 17, 2022
@MarkDordoy MarkDordoy deleted the md/add-validation branch December 1, 2022 20:34
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

This functionality has been released in v2.31.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jan 1, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants