mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-25 22:51:09 +00:00
Dont allow /
in article title (fixes #25)
This commit is contained in:
parent
8188296b88
commit
3128cbaefb
1 changed files with 3 additions and 0 deletions
|
@ -47,6 +47,9 @@ pub(in crate::backend::api) async fn create_article(
|
|||
if create_article.title.is_empty() {
|
||||
return Err(anyhow!("Title must not be empty").into());
|
||||
}
|
||||
if create_article.title.contains('/') {
|
||||
return Err(anyhow!("Invalid character `/`").into());
|
||||
}
|
||||
|
||||
let local_instance = DbInstance::read_local_instance(&data)?;
|
||||
let escaped_title = create_article.title.replace(' ', "_");
|
||||
|
|
Loading…
Reference in a new issue