3require_once dirname(__DIR__, 2) .
'/vendor/autoload.php';
4require_once dirname(__DIR__) .
'/dbxKernel.php';
6$fail =
static function (
string $message,
int $code): void {
7 fwrite(STDERR,
"FAIL: $message\n");
13 $fail(
'new_password() liefert keine gueltige Laenge oder Zeichenmenge.', 1);
19 $fail(
'Ein Request-Parameter kann weiterhin den API-Benutzer anmelden.', 2);
27$baseFile = dirname(__DIR__, 2) .
'/modules/dbx/cfg/config.php';
28$localFile = dirname(__DIR__, 2) .
'/modules/dbx/cfg/config.local.php';
33 array(
'db',
'dbxApp',
'pass'),
34 array(
'db',
'dbxTestCodex',
'pass'),
35 array(
'ftp',
'web',
'sftp_pass'),
36 array(
'mail',
'dbxApp',
'pass'),
38$readPath =
static function (array $data, array $path) {
39 foreach ($path as $part) {
40 if (!is_array($data) || !array_key_exists($part, $data)) {
50 $fail(
'Ein Geheimnis steht weiterhin in der versionierten config.php.', 3);
55 $runtime =
dbx()->get_config(
'dbx');
58 if ($localValue !==
null &&
$readPath($runtime, $path) !== $localValue) {
59 $fail(
'config.local.php wird nicht korrekt ueber die Basis gelegt.', 4);
64echo
"OK dbxApi security\n";
if(substr_count($sessionSource, 'dbx() ->invalidate_action_tokens();')< 2) $webAppSource
if($resolved !==$expectedBase . 'files/test/') $config
if(!is_string($webAppSource)||preg_match('/\\blogin\\s *\\(\\s *2\\s *\\)/', $webAppSource)===1 $loadConfig)
if(strlen($password) !==96||preg_match('/^ $webAppFile[a-zA-Z0-9_!\-]+$/', $password) !==1)
DBX schema administration.