fix: disallow empty tags

This commit is contained in:
Tobias Reisinger 2020-08-28 21:46:53 +02:00
parent f98a01f3f0
commit 6117548e32
3 changed files with 16 additions and 1 deletions
src/models

View file

@ -10,6 +10,11 @@
int
tag_save(int id, const char *tag)
{
if(strlen(tag) == 0)
{
LOGGER_ERR("saving an empty tag is not allowed (id: %d)\n", id);
return 1;
}
LOGGER_DEBUG("saving tag '%s' into database (id: %d)\n", tag, id);
int rc;