mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
backend: fix xattr bookmark title check
Do not check if the bookmark title is a valid filename, as we said in the user manual. However, we should ensure that the string does not contain NUL characters, since we assume that a valid bookmark storage should not contain bookmarks with such names.
This commit is contained in:
parent
996ca0e042
commit
3ed11f53e5
3 changed files with 6 additions and 6 deletions
|
@ -1210,8 +1210,8 @@ Extended attributes:
|
|||
The bookmark title.
|
||||
Only available with @option{filename=guid}.
|
||||
|
||||
This value is allowed be set to any string that is valid UTF-8,
|
||||
and does not have to be valid as a filename.
|
||||
This value is allowed be set to any string that does not contain a
|
||||
NUL character, and does not have to be valid as a filename.
|
||||
|
||||
@item guid
|
||||
The bookmark GUID.
|
||||
|
@ -1343,8 +1343,8 @@ Extended attributes:
|
|||
The bookmark title.
|
||||
Only available with @option{filename=guid}.
|
||||
|
||||
This value is allowed be set to any string that is valid UTF-8,
|
||||
and does not have to be valid as a filename.
|
||||
This value is allowed be set to any UTF-8 string that does not contain a
|
||||
NUL character, and does not have to be valid as a filename.
|
||||
|
||||
@item guid
|
||||
The bookmark GUID.
|
||||
|
|
|
@ -2663,7 +2663,7 @@ bookmark_set (
|
|||
break;
|
||||
|
||||
case ATTR_KEY_TITLE:
|
||||
if (0 != validate_filename(val, val_len, NULL)) {
|
||||
if (NULL != memchr(val, '\0', val_len)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
nocheck = false;
|
||||
|
|
|
@ -3650,7 +3650,7 @@ bookmark_set (
|
|||
break;
|
||||
|
||||
case ATTR_KEY_TITLE:
|
||||
if (0 != validate_filename(val, val_len, NULL)) {
|
||||
if (NULL != memchr(val, '\0', val_len)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
bm_cols.title = val;
|
||||
|
|
Loading…
Add table
Reference in a new issue