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
+42 -3
View File
@@ -1,14 +1,41 @@
<?php
/**
* GeoIPInfo plugin: toont geografische informatie op basis van IP-adres.
*
* Systeem-plugin die een admin-pagina biedt met het IP-adres van de bezoeker
* en het bijbehorende land via de GeoIP-dienst.
*
* @since 2.6.4
*/
class GeoIPInfo
{
/**
* Plugin-API instantie voor communicatie met de CMS-core.
*
* @since 2.6.4
* @var PluginAPIInterface|null
*/
private ?PluginAPIInterface $api = null;
/**
* 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;
}
/**
* Geeft de plugin-configuratie terug.
*
* @since 2.6.4
* @return array<string, mixed> Plugin-configuratie met title en type.
*/
public function getConfig(): array
{
return [
@@ -18,7 +45,10 @@ class GeoIPInfo
}
/**
* Register admin menu items.
* Geeft de admin-menu-items voor deze plugin terug.
*
* @since 2.6.4
* @return array<int, array<string, mixed>> Lijst met admin-menu-item configuraties.
*/
public function getAdminMenu(): array
{
@@ -34,7 +64,10 @@ class GeoIPInfo
}
/**
* Register admin routes this plugin handles.
* Geeft de admin-routes terug die deze plugin afhandelt.
*
* @since 2.6.4
* @return array<int, string> Lijst met admin-route namen.
*/
public function getAdminRoutes(): array
{
@@ -42,7 +75,13 @@ class GeoIPInfo
}
/**
* Handle admin route — render the admin page.
* Verwerkt een admin-route en toont de GeoIP-info-pagina.
*
* Bepaalt het IP-adres van de bezoeker en toont het land en de vlag.
*
* @since 2.6.4
* @param string $route De af te handelen admin-route.
* @return void
*/
public function handleAdminRoute(string $route): void
{