Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

improve validation of origin params to API calls #1981

Closed
lloyd opened this issue Jul 11, 2012 · 4 comments
Closed

improve validation of origin params to API calls #1981

lloyd opened this issue Jul 11, 2012 · 4 comments

Comments

@lloyd
Copy link
Contributor

lloyd commented Jul 11, 2012

as @fmarier pointed out in issue #1979, we can do much better with our regex in validate.js - more tightly validating incoming origins.

Not extremely high priority, but why not?

for reference, http://blog.gnukai.com/2010/06/fqdn-regular-expression/

@ghost ghost assigned zaach Jul 11, 2012
@lloyd
Copy link
Contributor Author

lloyd commented Jul 11, 2012

@zaach - you want?

@zaach
Copy link
Contributor

zaach commented Jul 11, 2012

That's a wicked regex. I'm on it.

@fmarier
Copy link
Contributor

fmarier commented Jul 12, 2012

One thing that I'll be doing soon is refactoring the code that extract the domain from an email address (GH-1994). Once I do that, I'll validate the extracted domain, just in case.

So I would suggest that we create a domain/hostname validation function that the origin type checking code could use to check the hostname part of the origin. Or perhaps we should create a new 'hostname' type instead?

zaach added a commit to zaach/browserid that referenced this issue Jul 12, 2012
lloyd added a commit that referenced this issue Jul 14, 2012
new regex for matching origins - issue #1981
@lloyd lloyd closed this as completed Jul 14, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants
@zaach @lloyd @fmarier and others