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

Relax validation of source field #507

Closed
pmac opened this issue Jan 9, 2023 · 0 comments · Fixed by #547
Closed

Relax validation of source field #507

pmac opened this issue Jan 9, 2023 · 0 comments · Fixed by #547
Assignees

Comments

@pmac
Copy link
Collaborator

pmac commented Jan 9, 2023

When testing locally, or even sometimes when users submit from around the web, the subscription request will be rejected by CTMS because their source data isn't a fully valid URL. It will fail if there is not a protocol, or if it's using http://localhost in some local testing, or if it's simply a path instead of a full URI. The data that comes in for that field (in basket it is source_url) is supposed to be a URL, but it is okay for it to be other things. It's meant as a way for us to identify the source of subscriptions if the site is willing to send us anything. I believe we should avoid rejecting any submission based on this data being not a perfectly valid URL. I recommend we remove all URL validation from this field and treat it simply as a text field and truncate it if it's too long.

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

Successfully merging a pull request may close this issue.

2 participants