diff options
author | Corey Hulen <corey@hulen.com> | 2015-06-30 19:44:38 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-06-30 19:44:38 -0800 |
commit | 1200f764842ec11557b686ca9226b357ff5b0c93 (patch) | |
tree | 2de170e3dc75a908da12298184a7626935d4e638 /web/react/components | |
parent | fd3dc5c5e5cbf1cc00aa67829028f175ddcee3f8 (diff) | |
parent | 018f6d96baf5f99efa643527fae78ec623ff1b69 (diff) | |
download | chat-1200f764842ec11557b686ca9226b357ff5b0c93.tar.gz chat-1200f764842ec11557b686ca9226b357ff5b0c93.tar.bz2 chat-1200f764842ec11557b686ca9226b357ff5b0c93.zip |
Merge pull request #102 from nickago/MM-1328
MM-1328 Now limits domain to just alphanumeric
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/signup_team_complete.jsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index 709bd6c99..587d8cb82 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -164,7 +164,9 @@ TeamUrlPage = React.createClass({ } var cleaned_name = utils.cleanUpUrlable(name); - if (cleaned_name != name) { + + var urlRegex = /^[a-z0-9]+([a-z\-0-9]+|(__)?)[a-z0-9]+$/g; + if (cleaned_name != name || !urlRegex.test(name)) { this.setState({name_error: "Must be lowercase alphanumeric characters"}); return; } |