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

API website generates invalid URLs #16310

Closed
jtdaugherty opened this issue Nov 18, 2020 · 5 comments
Closed

API website generates invalid URLs #16310

jtdaugherty opened this issue Nov 18, 2020 · 5 comments
Labels
Bug Report/Open Bug report/issue

Comments

@jtdaugherty
Copy link

Summary

The API website generates invalid URLs (i.e. with URL-unsafe characters that are not percent-encoded).

Steps to reproduce

  1. Go to https://api.mattermost.com/
  2. Click the "Channels" section
  3. Click a request (in this case "Patch a channel")
  4. The browser's URL contains curly braces that are not URL-encoded.

Expected behavior

The URL's curly braces are URL-encoded as per the URL RFC.

Observed behavior (that appears unintentional)

The URL in the browser's address bar contains un-encoded curly braces ({ and }), making that URL hostile in environments where the curly braces are not expected (because they are not valid in URLs).

Possible fixes

URL-encode the unsafe characters.

Resources

@amyblais
Copy link
Member

@jtdaugherty Would you be open to investigate further with https://github.com/Redocly/redoc?

@jtdaugherty
Copy link
Author

Hi @amyblais - I am not sure what you are requesting of me. Can you say more?

@amyblais
Copy link
Member

I had asked our team about this and they suggested the issue is most likely in the link generated by the API documentation.

You can see more on the discussion in this thread https://community.mattermost.com/core/pl/1kejrc7xbiym7yxnxop71zejwh on our community server if you have any additional questions.

@amyblais
Copy link
Member

@amyblais amyblais added the Bug Report/Open Bug report/issue label Nov 19, 2020
@hmhealey
Copy link
Member

hmhealey commented May 2, 2022

Those curly brackets don't actually need to be percent-encoded. They're wrapping a placeholder, so they shouldn't be included in a real request

@hmhealey hmhealey closed this as completed May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report/Open Bug report/issue
Projects
None yet
Development

No branches or pull requests

3 participants