From c55fa68ba1734be5bc737030c2e8e2fd5c26693e Mon Sep 17 00:00:00 2001
From: "OpenGenesis (MPL 2.0)"
<153564363+opengenesislink@users.noreply.github.com>
Date: Tue, 20 Oct 2026 23:43:08 +0200
Subject: [PATCH] feat: German ROBUST startup logs, MapLibre map and secure
portal registration name checks
* feat(maplibre): expose XYZ raster tile adapter for OpenSim Warp3D grid coordinates
* feat(map): replace custom map canvas with MapLibre GL raster XYZ map and region overlays
* test(map): verify MapLibre viewport and bound-safe XYZ adapter
* feat(robust): German grouped service lifecycle console messages
* i18n(robust): German startup, networking and security diagnostic messages
* i18n(robust): German startup, networking and security diagnostic messages
* i18n(robust): German startup, networking and security diagnostic messages
* i18n(robust): German startup, networking and security diagnostic messages
* i18n(robust): localize migration, grid and security diagnostics
* i18n(robust): localize migration, grid and security diagnostics
* i18n(robust): localize migration, grid and security diagnostics
* i18n(robust): localize migration, grid and security diagnostics
* i18n(robust): localize migration, grid and security diagnostics
* docs(openapi): advertise MapLibre XYZ Warp3D adapter
* docs(portal): complete Stadt NexVerse backend registration contract and rollout checklist
* docs(maplibre): synthetic XYZ coordinates, raster source and frontend CSP notes
* feat(registration): machine-authenticated live full-name availability endpoint
* feat(world-api): route scoped live avatar-name availability query
* docs(openapi): specify machine-key protected name-availability and registration routes
* docs(stadtportal): live Resident/full-name availability API and secure Go+JS debounce workflow
* test(registration): protect live availability contract, scope and final POST recheck
* test(hg): keep security warning regression after German localization
* test(maplibre): assert shared view route on API rather than page HTML
* test(maplibre): validate XYZ raster source rather than legacy DOM tile template
---
NexVerse/Server/Api/NexCitizenWorldMapApi.cs | 47 +++
NexVerse/Server/Api/NexCitizenWorldMapPage.cs | 287 ++++++++--------
.../Server/Api/NexVerseWorldApiConnector.cs | 25 +-
.../Server/Api/NexVerseWorldApiHandlers.cs | 5 +
.../Server/Api/OglPortalRegistrationApi.cs | 85 ++++-
OpenSim/Data/Migration.cs | 6 +-
.../Servers/HttpServer/BaseHttpServer.cs | 2 +-
OpenSim/Framework/Servers/ServerBase.cs | 10 +-
.../Inventory/XInventoryInConnector.cs | 8 +-
OpenSim/Server/ServerMain.cs | 61 +++-
OpenSim/Services/GridService/GridService.cs | 2 +-
.../Services/GridService/HypergridLinker.cs | 4 +-
doc/NexVerse/DEUTSCHLAND_GRID_MAP.md | 30 ++
doc/NexVerse/STADTPORTAL_REGISTRIERUNG.md | 307 ++++++++++++++++++
tools/ci/verify_citizen_world_map.py | 25 +-
.../ci/verify_hg_inventory_security_09312.py | 2 +-
...erify_portal_registration_iar_preflight.py | 28 ++
17 files changed, 723 insertions(+), 211 deletions(-)
create mode 100644 doc/NexVerse/STADTPORTAL_REGISTRIERUNG.md
diff --git a/NexVerse/Server/Api/NexCitizenWorldMapApi.cs b/NexVerse/Server/Api/NexCitizenWorldMapApi.cs
index 9fdc9c9c..511401b6 100644
--- a/NexVerse/Server/Api/NexCitizenWorldMapApi.cs
+++ b/NexVerse/Server/Api/NexCitizenWorldMapApi.cs
@@ -53,6 +53,12 @@ namespace NexVerse.Server.Api
string path = (request.UriPath ?? string.Empty).TrimEnd('/');
bool deutschland = path.StartsWith("/api/v1/deutschland", StringComparison.OrdinalIgnoreCase);
+ if (deutschland &&
+ path.StartsWith("/api/v1/deutschland/xyz/", StringComparison.OrdinalIgnoreCase))
+ {
+ HandleXyzTile(path, response);
+ return;
+ }
if (deutschland &&
path.StartsWith("/api/v1/deutschland/tiles/", StringComparison.OrdinalIgnoreCase))
{
@@ -201,6 +207,47 @@ namespace NexVerse.Server.Api
}
}
+ // MapLibre uses standard XYZ indices, while OpenSimulator stores map
+ // tiles by bottom-left grid coordinate and inverse native LOD.
+ // The fixed shift places all nonnegative OpenSim coordinates within
+ // the 24-bit virtual WebMercator tile plane, away from the poles.
+ // These longitude/latitude values are SYNTHETIC, never real geography.
+ private void HandleXyzTile(string path, IOSHttpResponse response)
+ {
+ const string prefix = "/api/v1/deutschland/xyz/";
+ const long mapAxis = 1L << 24;
+ const long gridShift = 1L << 22;
+ string[] parts = path.Substring(prefix.Length).Split('/');
+ if (parts.Length != 3 ||
+ !int.TryParse(parts[0], out int z) || z < 17 || z > 24 ||
+ !long.TryParse(parts[1], out long tileX) ||
+ !parts[2].EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) ||
+ !long.TryParse(parts[2].Substring(0, parts[2].Length - 4), out long tileY))
+ {
+ Json(response, HttpStatusCode.BadRequest, new { error = "invalid_xyz_tile" });
+ return;
+ }
+ long count = 1L << z;
+ if (tileX < 0 || tileY < 0 || tileX >= count || tileY >= count)
+ {
+ Json(response, HttpStatusCode.BadRequest, new { error = "invalid_xyz_bounds" });
+ return;
+ }
+ long span = 1L << (24 - z);
+ long gridX = tileX * span - gridShift;
+ long gridY = mapAxis - (tileY + 1) * span - gridShift;
+ if (gridX < 0 || gridY < 0 ||
+ gridX > MaxCellCoordinate - span + 1 ||
+ gridY > MaxCellCoordinate - span + 1)
+ {
+ Json(response, HttpStatusCode.NotFound, new { error = "map_tile_not_found" });
+ return;
+ }
+ int zoom = 25 - z;
+ HandleTile("/api/v1/deutschland/tiles/" + zoom + "/" +
+ gridX + "/" + gridY + ".jpg", response);
+ }
+
// Zoom=1 is one 256m grid cell; levels 2..8 are the native
// OpenSimulator multi-resolution files (2,4,8,...,128 cells per tile).
// Never interpret the coordinates as geographic longitude/latitude.
diff --git a/NexVerse/Server/Api/NexCitizenWorldMapPage.cs b/NexVerse/Server/Api/NexCitizenWorldMapPage.cs
index 79070d16..937be939 100644
--- a/NexVerse/Server/Api/NexCitizenWorldMapPage.cs
+++ b/NexVerse/Server/Api/NexCitizenWorldMapPage.cs
@@ -1,10 +1,9 @@
// SPDX-License-Identifier: MPL-2.0
-
namespace NexVerse.Server.Api
{
///