Skip to content

Commit

Permalink
Changed username validation (to func cleanID) during installation
Browse files Browse the repository at this point in the history
  • Loading branch information
jpedryc committed Feb 15, 2022
1 parent a575206 commit 2cb06bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

// load and initialize the core system
require_once(DOKU_INC . 'inc/init.php');
require_once(DOKU_INC . 'inc/pageutils.php');

// check for error reporting override or set error reporting to sane values
if (!defined('DOKU_E_LEVEL')) {
Expand Down Expand Up @@ -306,7 +307,7 @@ function check_data(&$d)
$ok = false;
}
if (isset($d['acl'])) {
if (!preg_match('/^[a-z0-9_]+$/', $d['superuser'])) {
if (empty($d['superuser']) || ($d['superuser'] !== cleanID($d['superuser']))) {
$error[] = sprintf($lang['i_badval'], $lang['i_superuser']);
$ok = false;
}
Expand Down

0 comments on commit 2cb06bb

Please sign in to comment.