Skip to content

Commit b0a59be

Browse files
committed
Ignore empty values
Some systems (an old sqlite version) seem to store an empty string in an empty field. We do not want to check that against the current user, because it will be empty if noone is logged in. That bypasses all ACLs!
1 parent 69809d6 commit b0a59be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

action.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function handleAclCheck(Doku_Event $event, $mode)
5959
$col = $schema->findColumn($field);
6060
if ($col && is_a($col->getType(), \dokuwiki\plugin\struct\types\User::class)) {
6161
$value = $data[$field]->getValue();
62+
if (empty($value)) continue;
6263
// multivalue field?
6364
if (is_array($value)) {
6465
$users = array_merge($users, $value);

0 commit comments

Comments
 (0)