diff --git a/public/index.php b/public/index.php index 7f5ca39..9f6b481 100644 --- a/public/index.php +++ b/public/index.php @@ -226,9 +226,25 @@ function dc_flash(string $message, string $type = 'success'): void /** * Post/Redirect/Get: leitet nach einer Aktion auf dieselbe Seite um, damit * ein Neuladen das Formular nicht erneut abschickt. + * + * Das Formular teilt beim Absenden im Feld _return mit, welche Unteransicht + * gerade geoeffnet war; dorthin wird zurueckgeleitet. Der als $fragment + * uebergebene Wert dient nur noch als Rueckfallebene, etwa wenn JavaScript + * abgeschaltet ist. + * + * Zuvor wurde ausschliesslich der Modul-Anker gesetzt. Man legte einen Monitor + * an und landete anschliessend auf dem Watchdog-Dashboard statt im Formular. */ function dc_redirect(string $fragment = ''): void { + $return = $_POST['_return'] ?? null; + + // Nur eigene Ansichtskennungen zulassen - der Wert landet in einem + // Location-Header. + if (is_string($return) && preg_match('/^(?:tab|sub)-[a-z0-9-]{1,60}$/', $return) === 1) { + $fragment = '#' . $return; + } + $query = $_SERVER['QUERY_STRING'] ?? ''; $target = '/index.php' . ($query !== '' ? '?' . $query : '') . $fragment; @@ -1722,6 +1738,10 @@ $csrfField = Csrf::field();
= htmlspecialchars($l['license_key']) ?>= e($l['license_key']) ?>| Projekt | Lizenzschlüssel | Hardware-ID / Quelle | -Plattform / Ver. | +Plattform | Hostname | Zuletzt gesehen | Status | @@ -2105,44 +2134,57 @@ $csrfField = Csrf::field();|||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| + Noch keine Aktivierungen. + | +||||||||||||
| = htmlspecialchars($a['product_name']) ?> | -= htmlspecialchars($a['license_key']) ?> |
+ = e($a['product_name']) ?> | += e($a['license_key']) ?> |
- = htmlspecialchars($a['hardware_id']) ?>
+ = e($a['hardware_id']) ?>
- Quelle: = htmlspecialchars($a['hwid_source']) ?> + Quelle: = e($a['hwid_source']) ?>
|
- - = htmlspecialchars(strtoupper($a['platform'] ?? 'WIN')) ?> (v= (int)($a['hwid_version'] ?? 1) ?>) + + = e(strtoupper((string)($a['platform'] ?? 'WIN'))) ?> · v= (int)($a['hwid_version'] ?? 1) ?> | -= htmlspecialchars($a['hostname'] ?? '-') ?> | -= htmlspecialchars($a['last_seen']) ?> | -- = $a['is_blocked'] ? 'GESPERRT' : 'AKTIV' ?> + | = e($a['hostname'] ?? '—') ?> | ++ = e(dc_ago($a['last_seen'] ?? null)) ?> | - - + + = !empty($a['is_blocked']) ? 'GESPERRT' : 'AKTIV' ?> + + | +
+
+
+
+
|
| Noch keine Einträge. | ||||||||||||
| = $log['id'] ?> | -= $log['created_at'] ?> | -= htmlspecialchars($log['actor']) ?> |
- = htmlspecialchars($log['action']) ?> | -= htmlspecialchars($log['details'] ?? '-') ?> |
+ = (int)$log['id'] ?> | += e(dc_dt((string)$log['created_at'])) ?> | += e($log['actor']) ?> |
+ = e($log['action']) ?> | += e($log['details'] ?? '—') ?> |
|||