Skip to content

Commit

Permalink
Limit server names to within 255 characters (nebari-dev#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
aktech authored Apr 11, 2024
1 parent 139176f commit db92483
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jhub_apps/hub_client/hub_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def normalize_server_name(self, servername):
text = re.sub(r"[^a-z0-9\s-]", "", text)
# Replace spaces with hyphens
text = text.replace(" ", "-")
return text
# Max limit for servername is 255 chars
return text[:240]

def start_server(self, username, servername):
if not servername:
Expand Down

0 comments on commit db92483

Please sign in to comment.