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

Use EncodeUri() if part of the URL path or EncodeUriComponent() if used as a URL parameter #1

Open
semisight opened this issue Jun 28, 2024 · 1 comment

Comments

@semisight
Copy link

semisight commented Jun 28, 2024

const url = 'https://pxl.iqm.com/' + (data.pixelType == 'conversion' ? 'i/pixel/' : 'c/' ) + data.pixelId;

When reviewing your template, we've noticed that it is using user-defined parameters to build a URL. It's best practice to use encodeUri() if part of the URL path or encodeUriComponent() if used as a URL parameter.

dtchanpura added a commit that referenced this issue Jul 3, 2024
@dtchanpura
Copy link

Hi @semisight, thanks for pointing it out, we will merge this soon once tested.

Though the input will be in format of UUID so won't make much difference but in future if the input format changes it will be handled.

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