Restrict app slug validation to only allow lowercase letters (#2878)

This commit is contained in:
Jonatan Kłosko 2024-11-28 13:50:35 +01:00 committed by GitHub
parent 37d8adb2dd
commit 2a4f298c32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,7 +91,7 @@ defmodule Livebook.Notebook.AppSettings do
:show_source,
:output_type
])
|> validate_format(:slug, ~r/^[a-zA-Z0-9-]+$/,
|> validate_format(:slug, ~r/^[a-z0-9-]+$/,
message: "should only contain alphanumeric characters and dashes"
)
|> cast_access_attrs(attrs)