Skip to content

Commit

Permalink
Ignore empty values
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
annda committed Sep 19, 2024
1 parent 69809d6 commit b0a59be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function handleAclCheck(Doku_Event $event, $mode)
$col = $schema->findColumn($field);
if ($col && is_a($col->getType(), \dokuwiki\plugin\struct\types\User::class)) {
$value = $data[$field]->getValue();
if (empty($value)) continue;
// multivalue field?
if (is_array($value)) {
$users = array_merge($users, $value);
Expand Down

0 comments on commit b0a59be

Please sign in to comment.