dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
dbxActionTokenAutomation_test.php
Go to the documentation of this file.
1<?php
2
3require_once dirname(__DIR__, 2) . '/vendor/autoload.php';
4require_once dirname(__DIR__) . '/dbxKernel.php';
5
6$fail = static function (string $message, int $code): void {
7 fwrite(STDERR, "FAIL: $message\n");
8 exit($code);
9};
10
11$_SESSION = array();
12$_GET = array();
13$_POST = array();
14
15dbx()->set_system_var('dbx_modul', 'testModule');
16dbx()->set_system_var('dbx_run1', 'list');
17dbx()->set_system_var('dbx_run2', '');
18dbx()->set_system_var('dbx_run3', '');
19
20$web = dbx()->get_system_obj('dbxWebApp');
21
22$navigation = '?dbx_modul=testModule&dbx_run1=list&dbx_page=admin';
24 $fail('Normale GET-Navigation wurde tokenisiert.', 1);
25}
26
27$automaticDeleteUrl = '?dbx_modul=testModule&dbx_run1=delete&rid=17';
31$automaticDeleteToken = (string)($automaticDeleteRoute['params']['dbx_token'] ?? '');
32if ((string)($automaticDeletePolicy['source'] ?? '') !== 'automatic'
33 || (string)($automaticDeletePolicy['action'] ?? '') !== 'dbxAction.delete'
34 || (string)($automaticDeletePolicy['bindings']['rid'] ?? '') !== '17'
36 (string)($automaticDeletePolicy['scope'] ?? ''),
38 )) {
39 $fail('delete plus rid wurde nicht automatisch tokenisiert.', 18);
40}
41
42$automaticSaveUrl = '?dbx_modul=testModule&dbx_run1=edit&dbx_run2=save&rid=23';
46if ((string)($automaticSavePolicy['source'] ?? '') !== 'automatic'
47 || (string)($automaticSavePolicy['action'] ?? '') !== 'dbxAction.save'
49 (string)($automaticSavePolicy['scope'] ?? ''),
50 (string)($automaticSaveRoute['params']['dbx_token'] ?? '')
51 )) {
52 $fail('save plus rid wurde nicht automatisch tokenisiert.', 19);
53}
54
55$namedDeleteUrl = '?dbx_modul=testModule&dbx_run1=invoice_delete&rid=25';
56$namedDeletePolicy = $web->action_policy_for_url($namedDeleteUrl);
57if ((string)($namedDeletePolicy['action'] ?? '') !== 'dbxAction.delete') {
58 $fail('delete als Aktionsbestandteil wurde nicht erkannt.', 25);
59}
60
61$undeleteUrl = '?dbx_modul=testModule&dbx_run1=undelete&rid=25';
63 $fail('undelete wurde faelschlich als delete erkannt.', 26);
64}
65
66$deleteWithoutRid = '?dbx_modul=testModule&dbx_run1=delete';
68 $fail('delete ohne RID wurde unnoetig tokenisiert.', 20);
69}
70
71$navigationWithRid = '?dbx_modul=testModule&dbx_run1=form&rid=17';
73 $fail('Normale RID-Navigation wurde tokenisiert.', 21);
74}
75
76$changedAutomaticDeletePolicy = $web->action_policy_for_url(
77 '?dbx_modul=testModule&dbx_run1=delete&rid=18'
78);
80 (string)($changedAutomaticDeletePolicy['scope'] ?? ''),
82)) {
83 $fail('Automatisches Delete-Token ist nicht an die RID gebunden.', 22);
84}
85
87$_POST = array();
88dbx()->set_system_var('dbx_modul', 'testModule');
89dbx()->set_system_var('dbx_run1', 'delete');
90dbx()->set_system_var('dbx_run2', '');
91dbx()->set_system_var('dbx_run3', '');
92$automaticCurrentPolicy = $web->current_action_policy();
93if ((string)($automaticCurrentPolicy['source'] ?? '') !== 'automatic'
94 || !$web->current_action_request_is_valid($automaticCurrentPolicy)) {
95 $fail('Automatischer RID-Request wird vor dem Modulstart nicht akzeptiert.', 23);
96}
97unset($_GET['dbx_token']);
98$automaticCurrentPolicy = $web->current_action_policy();
99if ($web->current_action_request_is_valid($automaticCurrentPolicy)) {
100 $fail('Automatischer RID-Request ohne Token wird zentral akzeptiert.', 24);
101}
102
103$_GET = array();
104dbx()->set_system_var('dbx_run1', 'list');
105
106$deleteUrl = '?dbx_modul=testModule&dbx_run1=list&dbx_do=row_delete&rid=17';
109$deleteToken = (string)($deleteRoute['params']['dbx_token'] ?? '');
110$deletePolicy = $web->action_policy_for_url($securedDeleteUrl);
111
112if (!preg_match('/^[a-f0-9]{64}$/', $deleteToken)
113 || (string)($deletePolicy['action'] ?? '') !== 'dbxReport.row_delete'
114 || !dbx()->check_action_token((string)($deletePolicy['scope'] ?? ''), $deleteToken)) {
115 $fail('Standard-Row-Delete wurde nicht kanonisch tokenisiert.', 2);
116}
117
118$changedRidUrl = '?dbx_modul=testModule&dbx_run1=list&dbx_do=row_delete&rid=18';
119$changedRidPolicy = $web->action_policy_for_url($changedRidUrl);
120if (dbx()->check_action_token((string)($changedRidPolicy['scope'] ?? ''), $deleteToken)) {
121 $fail('Ein Row-Delete-Token ist nicht an die RID gebunden.', 3);
122}
123
124$securityStore = $_SESSION['dbx']['session']['dbx']['security'] ?? array();
125if (!isset($securityStore['action_token_secret']) || isset($securityStore['action_tokens'])) {
126 $fail('Neue Tokens verwenden weiterhin einen Sessioneintrag je Scope.', 4);
127}
128
129for ($rid = 1; $rid <= 200; $rid++) {
130 dbx()->action_token('test.dynamic.' . $rid);
131}
132$securityStore = $_SESSION['dbx']['session']['dbx']['security'] ?? array();
133if (array_key_exists('action_tokens', $securityStore)) {
134 $fail('Dynamische Scopes vergroessern weiterhin die Sessionablage.', 5);
135}
136
137$_SESSION = array();
138if (dbx()->check_action_token('missing.scope', '')) {
139 $fail('Ein leerer Action-Token wurde akzeptiert.', 6);
140}
141if (isset($_SESSION['dbx']['session']['dbx']['security']['action_token_secret'])) {
142 $fail('Eine leere Token-Pruefung schreibt unnoetig eine Session.', 7);
143}
144
145$unknownToken = str_repeat('a', 64);
146if (dbx()->check_action_token('missing.scope', $unknownToken)) {
147 $fail('Ein unbekannter Action-Token wurde akzeptiert.', 30);
148}
149if (isset($_SESSION['dbx']['session']['dbx']['security']['action_token_secret'])) {
150 $fail('Eine ungueltige Token-Pruefung erzeugt ein neues Session-Secret.', 31);
151}
152
153$legacyToken = bin2hex(random_bytes(32));
154dbx()->set_session_var(
155 'action_tokens',
156 array('legacy.scope' => $legacyToken),
157 'security',
158 'dbx'
159);
160if (!dbx()->check_action_token('legacy.scope', $legacyToken)) {
161 $fail('Ein bereits gerenderter Legacy-Link ist nicht mehr kompatibel.', 8);
162}
163
164// Eine Modulroute wird einmal deklarativ registriert. Fuer den Test bleibt
165// die Konfiguration ausschliesslich im aktuellen Session-Cache.
166$dbxConfig = dbx()->get_config('dbx');
167$dbxConfig['action_routes'] = array(
168 'custom_delete' => array(
169 'match' => array(
170 'dbx_run1' => 'test_action',
171 'dbx_do' => 'remove',
172 ),
173 'bind' => array('id'),
174 ),
175);
176$_SESSION['dbx']['config']['dbx'] = $dbxConfig;
177
178$customUrl = '?dbx_modul=dbx&dbx_run1=test_action&dbx_do=remove&id=44';
181$customPolicy = $web->action_policy_for_url($customSecuredUrl);
182if ((string)($customPolicy['source'] ?? '') !== 'module'
183 || (string)($customPolicy['action'] ?? '') !== 'dbx.custom_delete'
184 || !dbx()->check_action_token(
185 (string)($customPolicy['scope'] ?? ''),
186 (string)($customRoute['params']['dbx_token'] ?? '')
187 )) {
188 $fail('Deklarierte Modulaktion wird nicht automatisch tokenisiert.', 9);
189}
190
191// Aktueller Request: dieselbe zentrale Policy muss vor dem Modulstart gelten.
194$_GET = $currentRoute['params'];
195$_POST = array();
196dbx()->set_system_var('dbx_modul', 'testModule');
197dbx()->set_system_var('dbx_run1', 'list');
198dbx()->set_system_var('dbx_run2', '');
199dbx()->set_system_var('dbx_run3', '');
200
201$currentPolicy = $web->current_action_policy();
202if (!$currentPolicy || !$web->current_action_request_is_valid($currentPolicy)) {
203 $fail('Ein gueltiger aktueller Action-Request wird zentral abgewiesen.', 10);
204}
205
206$_GET['dbx_token'] = str_repeat('0', 64);
207$currentPolicy = $web->current_action_policy();
208if ($web->current_action_request_is_valid($currentPolicy)) {
209 $fail('Ein falscher aktueller Action-Token wird zentral akzeptiert.', 11);
210}
211
212dbx()->get_system_obj('dbxReport', 'load');
213
215 public function configure(string $action): void {
216 $this->_action = $action;
217 $this->_fid = 'action-token-report';
218 $this->_dbx_modul = 'testModule';
219 }
220
221 public function rowDeleteData(array $record): array {
222 return $this->get_table_row_action_data('delete', $record);
223 }
224
225 public function deleteTableButton(): string {
226 return $this->get_delete_tab_button();
227 }
228
229 public function multiAction(string $code): array {
230 return (array)($this->_report_multi_actions[$code] ?? array());
231 }
232
233 public function gridUrls(array $urls): array {
234 $this->_grid_read_url = (string)($urls['read'] ?? '');
235 $this->_grid_save_url = (string)($urls['save'] ?? '');
236 $this->_grid_insert_url = (string)($urls['insert'] ?? '');
237 $this->_grid_delete_url = (string)($urls['delete'] ?? '');
238 $this->_grid_sort_url = (string)($urls['sort'] ?? '');
239 $this->_grid_sync_url = (string)($urls['sync'] ?? '');
240 return $this->get_grid_replaces();
241 }
242}
243
245 public function configure(string $action): void {
246 $this->init('action-token-form');
247 $this->_action = $action;
248 }
249
250 public function mergedAction(): string {
251 return $this->merge_tpl_data('{action}', 1);
252 }
253}
254
255dbx()->set_system_var('dbx_modul', 'testModule');
256dbx()->set_system_var('dbx_run1', 'list');
257dbx()->set_system_var('dbx_run2', '');
258dbx()->set_system_var('dbx_run3', '');
259
261$form->configure(
262 '?dbx_modul=testModule&dbx_run1=edit&dbx_run2=save_record&rid=31'
263);
264$formAction = $form->mergedAction();
266$formActionPolicy = $web->action_policy_for_url($formAction);
267if ((string)($formActionPolicy['action'] ?? '') !== 'dbxAction.save'
268 || !dbx()->check_action_token(
269 (string)($formActionPolicy['scope'] ?? ''),
270 (string)($formActionRoute['params']['dbx_token'] ?? '')
271 )) {
272 $fail('dbxForm tokenisiert erkannte RID-Actions nicht automatisch.', 27);
273}
274
276$report->configure('?dbx_modul=testModule&dbx_run1=list');
277$rowAction = $report->rowDeleteData(array('id' => 23));
278$rowRoute = $web->parse_route_url((string)($rowAction['action'] ?? ''));
279$rowPolicy = $web->action_policy_for_url((string)($rowAction['action'] ?? ''));
280if ((string)($rowRoute['params']['dbx_do'] ?? '') !== 'row_delete'
281 || (string)($rowRoute['params']['rid'] ?? '') !== '23'
282 || !dbx()->check_action_token(
283 (string)($rowPolicy['scope'] ?? ''),
284 (string)($rowRoute['params']['dbx_token'] ?? '')
285 )) {
286 $fail('dbxReport tokenisiert die Row-Delete-URL nicht automatisch.', 12);
287}
288
289$report->enable_delete_tab('dbxMissing');
290$deleteTableHtml = html_entity_decode($report->deleteTableButton(), ENT_QUOTES | ENT_HTML5, 'UTF-8');
291if (strpos($deleteTableHtml, 'dbx_do=delete_tab') === false
292 || strpos($deleteTableHtml, 'dbx_token=') === false) {
293 $fail('dbxReport tokenisiert delete_tab nicht automatisch.', 13);
294}
295
296$adminDeleteUrl = '?dbx_modul=dbxAdmin&dbx_run1=trace&dbx_run2=list_trace&dbx_do=delete_tab';
300if ((string)($adminDeletePolicy['action'] ?? '') !== 'dbxReport.delete_tab'
301 || !dbx()->check_action_token(
302 (string)($adminDeletePolicy['scope'] ?? ''),
303 (string)($adminDeleteRoute['params']['dbx_token'] ?? '')
304 )) {
305 $fail('dbxAdmin-Reports verwenden nicht den zentralen delete_tab-Scope.', 28);
306}
307
308foreach (array(
309 dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxTrace.class.php',
310 dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxMissing.class.php',
311 dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxSession.class.php',
312 dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxSysMsg.class.php',
313) as $adminReportSourceFile) {
314 $adminReportSource = (string)file_get_contents($adminReportSourceFile);
315 if (strpos($adminReportSource, 'enable_delete_tab(') === false
316 || strpos($adminReportSource, 'check_action_token(') !== false
317 || strpos($adminReportSource, 'action_token(') !== false) {
318 $fail('dbxAdmin-Report dupliziert die zentrale dbxReport-Tokenpruefung.', 29);
319 }
320}
321
322$sysMsgSource = (string)file_get_contents(
323 dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxSysMsg.class.php'
324);
325if (strpos($sysMsgSource, 'dbx_do=delete_error_log&rid=error_log') === false
326 || strpos($sysMsgSource, "dbx()->action_url(") === false) {
327 $fail('Das Loeschen des PHP-Error-Logs ist nicht automatisch RID-gebunden signiert.', 34);
328}
329
330require_once dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxUser.class.php';
331$adminUser = new \dbx\dbxAdmin\dbxUser();
332$adminUserAction = new ReflectionMethod($adminUser, 'action_url');
335 'list_user',
336 array('dbx_do' => 'row_delete', 'rid' => 9)
337);
340if ((string)($adminUserDeletePolicy['action'] ?? '') !== 'dbxReport.row_delete'
341 || !dbx()->check_action_token(
342 (string)($adminUserDeletePolicy['scope'] ?? ''),
343 (string)($adminUserDeleteRoute['params']['dbx_token'] ?? '')
344 )) {
345 $fail('dbxAdmin-Benutzerloeschung verwendet nicht den zentralen Row-Delete-Scope.', 35);
346}
347
350 'list_user',
351 array('dbx_do' => 'verify', 'rid' => 9)
352);
355 'list_user',
356 array('dbx_do' => 'verify', 'rid' => 10)
357);
359 $web->parse_route_url($adminVerifyUrl9)['params']['dbx_token'] ?? ''
360);
362 $web->parse_route_url($adminVerifyUrl10)['params']['dbx_token'] ?? ''
363);
365 || !dbx()->check_action_token('dbxAdmin.user.verify.9', $adminVerifyToken9)
366 || dbx()->check_action_token('dbxAdmin.user.verify.10', $adminVerifyToken9)) {
367 $fail('dbxAdmin-Sonderaktionen sind nicht an Aktion und RID gebunden.', 40);
368}
369
370require_once dirname(__DIR__, 2) . '/modules/dbxShop_admin/include/dbxShopAdmin.class.php';
371$shopAdmin = new \dbx\dbxShop_admin\dbxShopAdmin();
372$shopAction = new ReflectionMethod($shopAdmin, 'actionUrl');
373$shopDeleteUrl = (string)$shopAction->invoke(
375 '?dbx_modul=dbxShop_admin&dbx_run1=products&dbx_do=row_delete&rid=11'
376);
378$shopDeletePolicy = $web->action_policy_for_url($shopDeleteUrl);
379if ((string)($shopDeletePolicy['action'] ?? '') !== 'dbxReport.row_delete'
380 || !dbx()->check_action_token(
381 (string)($shopDeletePolicy['scope'] ?? ''),
382 (string)($shopDeleteRoute['params']['dbx_token'] ?? '')
383 )) {
384 $fail('dbxShop-Produktloeschung verwendet nicht den zentralen Row-Delete-Scope.', 36);
385}
386
387$report->add_action('rows_delete', 'action_button_delete', '&dbx_run2=multi_delete');
388$multiAction = $report->multiAction('multi_delete');
389$multiRoute = $web->parse_route_url((string)($multiAction['action'] ?? ''));
390$multiPolicy = $web->action_policy_for_url((string)($multiAction['action'] ?? ''));
391if (!dbx()->check_action_token(
392 (string)($multiPolicy['scope'] ?? ''),
393 (string)($multiRoute['params']['dbx_token'] ?? '')
394)) {
395 $fail('dbxReport tokenisiert Multi-Delete nicht automatisch.', 14);
396}
397
398$gridBase = '?dbx_modul=testModule&dbx_run1=grid';
399$gridUrls = $report->gridUrls(array(
400 'read' => $gridBase . '&dbx_run2=records_grid_read',
401 'save' => $gridBase . '&dbx_run2=records_grid_save',
402 'insert' => $gridBase . '&dbx_run2=records_grid_insert',
403 'delete' => $gridBase . '&dbx_run2=records_grid_delete',
404 'sort' => $gridBase . '&dbx_run2=records_grid_sort',
405 'sync' => $gridBase . '&dbx_run2=records_grid_sync',
406));
407if ((string)($gridUrls['read_url'] ?? '') !== $gridBase . '&dbx_run2=records_grid_read') {
408 $fail('Die lesende Grid-URL wurde unnoetig veraendert.', 32);
409}
410foreach (array('save', 'insert', 'delete', 'sort', 'sync') as $gridAction) {
411 $gridUrl = (string)($gridUrls[$gridAction . '_url'] ?? '');
412 $gridRoute = $web->parse_route_url($gridUrl);
413 $gridPolicy = $web->action_policy_for_url($gridUrl);
414 if (isset($gridRoute['params']['dbx_do'])
415 || (string)($gridPolicy['action'] ?? '') !== 'dbxReport.grid_' . $gridAction
416 || !dbx()->check_action_token(
417 (string)($gridPolicy['scope'] ?? ''),
418 (string)($gridRoute['params']['dbx_token'] ?? '')
419 )) {
420 $fail('dbxReport tokenisiert Grid-' . $gridAction . ' nicht zentral.', 33);
421 }
422}
423
425 'save' => '?dbx_modul=testModule&dbx_run1=grid&dbx_run2=write',
426));
427if ((string)($unrecognizedGridUrls['save_url'] ?? '') !== '') {
428 $fail('Eine nicht erkennbare schreibende Grid-Route wurde unsigniert ausgegeben.', 39);
429}
430
431$directGridRoute = $web->parse_route_url(
432 $gridBase . '&dbx_run2=records_grid_delete'
433);
434$_GET = $directGridRoute['params'];
435$_POST = array('id' => 77);
436dbx()->set_system_var('dbx_modul', 'testModule');
437dbx()->set_system_var('dbx_run1', 'grid');
438dbx()->set_system_var('dbx_run2', 'records_grid_delete');
439$directGridPolicy = $web->current_action_policy();
440if ((string)($directGridPolicy['action'] ?? '') !== 'dbxReport.grid_delete'
441 || $web->current_action_request_is_valid($directGridPolicy)) {
442 $fail('Eine direkt konstruierte Grid-Delete-Anfrage ohne Token wird nicht abgewiesen.', 37);
443}
444$_GET = array();
445$_POST = array();
446
448 '?dbx_modul=dbxAdmin&dbx_run1=dd&dbx_run2=data_save&rid=dbx%7CdbxUser' =>
449 'dbxReport.grid_save',
450 '?dbx_modul=dbxAdmin&dbx_run1=dd&dbx_run2=fields_insert&modul=dbx&dd=dbxUser' =>
451 'dbxReport.grid_insert',
452 '?dbx_modul=dbxContent_admin&dbx_run1=content&dbx_run2=content_grid_sync' =>
453 'dbxReport.grid_sync',
454 '?dbx_modul=dbxUser_admin&dbx_run1=user&dbx_run2=user_grid_delete' =>
455 'dbxReport.grid_delete',
456);
457foreach ($realGridRoutes as $realGridUrl => $expectedGridAction) {
458 $realGridPolicy = $web->action_policy_for_url($realGridUrl);
459 if ((string)($realGridPolicy['action'] ?? '') !== $expectedGridAction) {
460 $fail('Reale Grid-Route wird nicht erkannt: ' . $realGridUrl, 38);
461 }
462}
463
464$tokenBeforeAuthChange = dbx()->action_token('auth.boundary');
465dbx()->invalidate_action_tokens();
466$tokenAfterAuthChange = dbx()->action_token('auth.boundary');
468 || dbx()->check_action_token('auth.boundary', $tokenBeforeAuthChange)
469) {
470 $fail('Ein Action-Token ueberlebt den Sicherheitskontextwechsel.', 15);
471}
472
473$sessionSource = (string)file_get_contents(
474 dirname(__DIR__) . '/dbxSession.class.php'
475);
476if (substr_count($sessionSource, 'dbx()->invalidate_action_tokens();') < 2) {
477 $fail('Login und Logout invalidieren Action-Tokens nicht beide.', 16);
478}
479
480$webAppSource = (string)file_get_contents(
481 dirname(__DIR__) . '/dbxWebApp.class.php'
482);
483$runSource = substr(
485 (int)strrpos($webAppSource, 'function run()')
486);
487$policyPosition = strpos($runSource, '$actionPolicy = $this->current_action_policy();');
488$modulePosition = strpos($runSource, '$dbxModul=dbx()->get_modul_obj($modul);');
489if ($policyPosition === false
490 || $modulePosition === false
492) {
493 $fail('Die zentrale Action-Pruefung laeuft nicht vor dem Modulcode.', 17);
494}
495
496echo "OK dbx action token automation\n";
init($fid, $tpl='')
Öffentliche Init-Methode.
merge_tpl_data($tpl, $i=0)
Führt grundlegende Form-Replaces in Templates aus.
get_delete_tab_button()
Rendert den Button fuer {db:delete_tab}.
get_table_row_action_data($type, array $record)
Baut das Standard-Datenarray für Row-Aktions-Templates.
if((string)($automaticSavePolicy['source'] ?? '') !=='automatic'||(string)($automaticSavePolicy['action'] ?? '') !=='dbxAction.save'||!dbx() ->check_action_token((string)($automaticSavePolicy['scope'] ?? ''),(string)($automaticSaveRoute['params']['dbx_token'] ?? ''))) $namedDeleteUrl
if(dbx() ->action_url($navigation) !==$navigation) $automaticDeleteUrl
if(dbx() ->check_action_token((string)($changedRidPolicy['scope'] ?? ''), $deleteToken)) $securityStore
if((string)( $gridUrls[ 'read_url'] ?? '') !==$gridBase . '&dbx_run2=records_grid_read') foreach(array('save', 'insert', 'delete', 'sort', 'sync') as $gridAction) $unrecognizedGridUrls
if(!preg_match('/^[a-f0-9]{64}$/', $deleteToken)||(string)($deletePolicy['action'] ?? '') !=='dbxReport.row_delete'||!dbx() ->check_action_token((string)($deletePolicy['scope'] ?? ''), $deleteToken)) $changedRidUrl
if(strpos($deleteTableHtml, 'dbx_do=delete_tab')===false||strpos($deleteTableHtml, 'dbx_token=')===false) $adminDeleteUrl
if(substr_count($sessionSource, 'dbx() ->invalidate_action_tokens();')< 2) $webAppSource
if(dbx() ->check_action_token( 'missing.scope', $unknownToken)) if(isset($_SESSION['dbx']['session']['dbx']['security']['action_token_secret'])) $legacyToken
if((string)( $adminDeletePolicy[ 'action'] ?? '') !=='dbxReport.delete_tab'||!dbx() ->check_action_token((string)( $adminDeletePolicy[ 'scope'] ?? ''),(string)( $adminDeleteRoute[ 'params'][ 'dbx_token'] ?? ''))) foreach(array(dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxTrace.class.php', dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxMissing.class.php', dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxSession.class.php', dirname(__DIR__, 2) . '/modules/dbxAdmin/include/dbxSysMsg.class.php',) as $adminReportSourceFile) $sysMsgSource
if($tokenBeforeAuthChange===$tokenAfterAuthChange||dbx() ->check_action_token('auth.boundary', $tokenBeforeAuthChange)) $sessionSource
if((string)($adminUserDeletePolicy['action'] ?? '') !=='dbxReport.row_delete'||!dbx() ->check_action_token((string)($adminUserDeletePolicy['scope'] ?? ''),(string)($adminUserDeleteRoute['params']['dbx_token'] ?? ''))) $adminVerifyUrl9
if(dbx() ->action_url($deleteWithoutRid) !==$deleteWithoutRid) $navigationWithRid
if((string)($namedDeletePolicy['action'] ?? '') !=='dbxAction.delete') $undeleteUrl
if((string)($automaticDeletePolicy['source'] ?? '') !=='automatic'||(string)($automaticDeletePolicy['action'] ?? '') !=='dbxAction.delete'||(string)($automaticDeletePolicy['bindings']['rid'] ?? '') !=='17'||!dbx() ->check_action_token((string)($automaticDeletePolicy['scope'] ?? ''), $automaticDeleteToken)) $automaticSaveUrl
if((string)($customPolicy['source'] ?? '') !=='module'||(string)($customPolicy['action'] ?? '') !=='dbx.custom_delete'||!dbx() ->check_action_token((string)($customPolicy['scope'] ?? ''),(string)($customRoute['params']['dbx_token'] ?? ''))) $currentSecuredUrl
if(dbx() ->action_url($undeleteUrl) !==$undeleteUrl) $deleteWithoutRid
if(!dbx() ->check_action_token((string)($multiPolicy['scope'] ?? ''),(string)($multiRoute['params']['dbx_token'] ?? ''))) $gridBase
if((string)($formActionPolicy['action'] ?? '') !=='dbxAction.save'||!dbx() ->check_action_token((string)($formActionPolicy['scope'] ?? ''),(string)($formActionRoute['params']['dbx_token'] ?? ''))) $report
if((string)($unrecognizedGridUrls['save_url'] ?? '') !=='') $directGridRoute
if(dbx() ->check_action_token( 'missing.scope', '')) if(isset($_SESSION['dbx']['session']['dbx']['security']['action_token_secret'])) $unknownToken
foreach($realGridRoutes as $realGridUrl=> $expectedGridAction) $tokenBeforeAuthChange
if(dbx() ->action_url($navigationWithRid) !==$navigationWithRid) $changedAutomaticDeletePolicy
if(!dbx() ->check_action_token('legacy.scope', $legacyToken)) $dbxConfig
action_url(string $url, string $action='', array $bindings=array())
Tokenisiert eine automatisch erkannte zustandsaendernde Route.
Definition dbxApi.php:1270
check_action_token(string $scope='global', string $token='')
Prueft ein sessiongebundenes Aktions-Token.
Definition dbxApi.php:1206
exit
Definition index.php:146
DBX schema administration.