v0.0.2
OMP-DX Security & Text Rendering Update
This release focuses on security hardening, safer font loading, async logging, event spam protection, and improved Unicode text rendering.
Highlights
- Mitigated the previous font-based RCE risk by removing arbitrary remote font loading.
- Added SHA-256 based font allowlist validation.
- Added server-to-client font transfer with strict client-side verification.
- Added async client/server logging to prevent log writes from freezing gameplay.
- Added server-side protection against invalid and valid element ID spam.
- Added Unicode text rendering support for UTF-8 strings.
- Added
/dxtexttest panel for multilingual text rendering checks.
Security
Font RCE Mitigation
Font loading has been redesigned around an allowlist model.
Previously, server-side scripts could request arbitrary font resources, which created a dangerous attack surface because the client could be forced to parse untrusted font files.
Now:
- Fonts must match an allowlist entry.
- The client validates:
- SHA-256 hash
- font family
- file name
- Unsafe font names, paths, URLs,
.., and unsupported extensions are rejected. - Server-provided font bytes are only accepted if they match the client allowlist.
- Bundled fonts are shipped in the client
omp-dx/fonts/directory.
Bundled fonts currently include:
- FontAwesome
- Outfit
- Poppins
- JetBrains Mono
Event ID Spam Protection
Server-side DX event handling is now hardened against malicious clients sending random or excessive element IDs.
Added protections:
- Per-player DX element registry
- Unknown/disallowed element rejection
- Global player event rate limit
- Per-element/per-event rate limits
- Valid-ID spam throttling
- Safer handling for stateful events like sliders, drag, color picker, and scroll containers
- Drag events are now only accepted for elements explicitly marked draggable
This prevents clients from crashing or heavily stressing the server by sending arbitrary DX event packets.
Registry Overflow Protection
The server now enforces a maximum DX element count per player. If the registry is full, new element payloads are rejected instead of silently desynchronizing client/server state.
Logging
Client and server loggers are now asynchronous.
Changed logs:
dx_client_log.txtdx_server_log.txt
Benefits:
- Log writes no longer block the game/server thread directly.
- Queues are bounded to prevent unbounded memory growth.
- Oversized log messages are truncated.
- Dropped messages are reported when the queue overflows.
Text Rendering
Unicode Rendering Support
The client text renderer now supports UTF-8 text properly.
Fixed issues like:
Türkçerendering asTürkçe- Russian/Chinese/Korean text appearing as mojibake
- Unicode text width measurement being based on raw bytes
Added:
- UTF-8 to UTF-16 conversion
- Unicode glyph cache
- Unicode-aware text width measurement
- Better button centering and input cursor positioning for Unicode text
This should work for any language where the selected font contains the required glyphs.
Notes:
- Font coverage still matters.
- Complex shaping is not fully implemented yet, so Arabic, Indic scripts, emoji ZWJ sequences, etc. may require future DirectWrite/HarfBuzz-style shaping support for perfect rendering.
Test Script
Added a new /dxtext command to the test filterscript.
The new text rendering panel includes:
- Korean text
- Chinese text
- Russian text
- Turkish text
- Mixed-language text
- Font coverage tests
- Scale tests
- Clip area text test
Existing component lab commands remain available:
/dxlab/dxfont/dxfontbad/dxclear
API / Behavior Changes
DX_LoadFont
DX_LoadFont now expects a safe local/server font file name instead of an arbitrary remote URL.
DX_LoadFont(playerid, "Outfit", "Outfit.ttf");Security behavior:
- Client checks
omp-dx/fonts/font-allowlist.txt. - Server may transfer font bytes, but the client still verifies the SHA-256 allowlist.
- Missing or unapproved fonts are rejected.
Allowlist format:
SHA256|FontFamily|FileNameExample:
...|Outfit|Outfit.ttfBuild / Packaging Notes
Client deployment now requires copying the generated omp-dx/ folder next to the ASI.
Expected client layout:
GTA San Andreas/
omp-dx.asi
omp-dx/
fonts/
font-allowlist.txt
FontAwesome.ttf
Outfit.ttf
Poppins.ttf
JetBrainsMono.ttfServer-side fonts can be placed in one of:
fonts/
omp-dx/fonts/
components/omp-dx/fonts/Commits Included
Harden server DX event handlingMitigate font RCE and harden text renderingAdd DX text rendering test panelDocument secure font loading
Recommended Upgrade Steps
- Replace the server component DLL.
- Replace the client ASI.
- Copy the client
omp-dx/asset folder next to the ASI. - Update
omp-dx.inc. - Recompile scripts using
DX_LoadFont. - Test
/dxtextand/dxlabon a local server.
Important Security Note
This update prevents servers from forcing clients to parse arbitrary remote fonts. Font loading is now controlled by the client-side allowlist.