For now, allow all characters in stream names.

We've had multiple requests from MIT zephyr users to allow
non-alphanumeric stream names, and we haven't decided what we want to
allow, so for now allow everything.

Note that the web client and mirror script limit stream names to 30
characters, which is our database limit.

(imported from commit 2acb5ee04e5ee7c40031ac831e12d09d04bbb2e6)
This commit is contained in:
Jessica McKellar 2012-11-07 15:05:50 -05:00
parent 1801292320
commit 9077d51d54
2 changed files with 2 additions and 3 deletions

View File

@ -512,7 +512,7 @@ web interface.
print
def valid_stream_name(name):
return re.match(r'^[\w.][\w. -]*$', name, flags=re.UNICODE)
return True
def parse_zephyr_subs(verbose=False):
zephyr_subscriptions = set()

View File

@ -767,8 +767,7 @@ def json_remove_subscription(request):
return json_success({"data": sub_name})
def valid_stream_name(name):
# Streams must start with a letter or number or a dot.
return re.match(r'^[\w.][\w. -]*$', name, flags=re.UNICODE)
return True
@login_required_api_view
def api_subscribe(request, user_profile):