Security: verwijder hardcoded wachtwoord, voeg random-wachtwoord-generator toe bij eerste installatie

This commit is contained in:
2026-08-27 08:57:05 +00:00
parent 6485f693dc
commit 74612aefbb
55 changed files with 6019 additions and 876 deletions
+55
View File
@@ -1,10 +1,36 @@
<?php
/**
* HTMLBlock plugin: toont context-afhankelijke HTML-blokken in de zijbalk.
*
* Content-plugin die informatie over de huidige pagina toont,
* inclusief taal, homepage-status, bestandsinformatie en snelle navigatie.
*
* @since 2.6.4
*/
class HTMLBlock
{
/**
* Plugin-configuratie.
*
* @since 2.6.4
* @var array<string, mixed>
*/
private array $config;
/**
* Plugin-API instantie voor communicatie met de CMS-core.
*
* @since 2.6.4
* @var PluginAPIInterface|null
*/
private ?PluginAPIInterface $api = null;
/**
* Initialiseert de plugin met standaardconfiguratie.
*
* @since 2.6.4
*/
public function __construct()
{
$this->config = [
@@ -13,11 +39,27 @@ class HTMLBlock
];
}
/**
* Stelt de Plugin-API instantie in.
*
* @since 2.6.4
* @param PluginAPIInterface $api De Plugin-API instantie.
* @return void
*/
public function setAPI(PluginAPIInterface $api): void
{
$this->api = $api;
}
/**
* Genereert de HTML-inhoud voor de zijbalk.
*
* Toont informatie over de huidige pagina, taal, homepage-status,
* bestandsinformatie en een snelle navigatielijst.
*
* @since 2.6.4
* @return string De opgebouwde HTML voor de zijbalk.
*/
public function getSidebarContent(): string
{
// Content plugin: translations follow the current content language.
@@ -89,11 +131,24 @@ class HTMLBlock
return $content;
}
/**
* Geeft de plugin-configuratie terug.
*
* @since 2.6.4
* @return array<string, mixed> Plugin-configuratie.
*/
public function getConfig(): array
{
return $this->config;
}
/**
* Stelt de plugin-configuratie in door deze te mergen met standaardwaarden.
*
* @since 2.6.4
* @param array<string, mixed> $config De configuratie die samengevoegd moet worden.
* @return void
*/
public function setConfig(array $config): void
{
$this->config = array_merge($this->config, $config);