From 57b0a107058d28c6b995f074b6c0a00445292435 Mon Sep 17 00:00:00 2001 From: LX1IQ Date: Tue, 21 Oct 2025 09:42:28 +0200 Subject: [PATCH] Revert "More XSS and security fixes, this time for the OG Dashboard" --- dashboard/changes.txt | 91 --------- dashboard/css/layout.css | 0 dashboard/favicon.ico | Bin dashboard/index.php | 62 ++---- dashboard/pgs/class.interlink.php | 50 ++--- dashboard/pgs/class.node.php | 57 ++---- dashboard/pgs/class.parsexml.php | 32 ++- dashboard/pgs/class.peer.php | 31 +-- dashboard/pgs/class.reflector.php | 316 +++++++++++------------------- dashboard/pgs/class.station.php | 42 ++-- dashboard/pgs/config.inc.php | 7 +- dashboard/pgs/country.csv | 0 dashboard/pgs/functions.php | 91 +-------- dashboard/pgs/liveccs.php | 0 dashboard/pgs/liveircddb.php | 0 dashboard/pgs/modules.php | 20 +- dashboard/pgs/peers.php | 24 +-- dashboard/pgs/reflectors.php | 14 +- dashboard/pgs/repeaters.php | 51 ++--- dashboard/pgs/traffic.php | 47 +++-- dashboard/pgs/users.php | 83 ++++---- 21 files changed, 329 insertions(+), 689 deletions(-) mode change 100644 => 100755 dashboard/changes.txt mode change 100644 => 100755 dashboard/css/layout.css mode change 100644 => 100755 dashboard/favicon.ico mode change 100644 => 100755 dashboard/index.php mode change 100644 => 100755 dashboard/pgs/class.interlink.php mode change 100644 => 100755 dashboard/pgs/class.node.php mode change 100644 => 100755 dashboard/pgs/class.parsexml.php mode change 100644 => 100755 dashboard/pgs/class.peer.php mode change 100644 => 100755 dashboard/pgs/class.reflector.php mode change 100644 => 100755 dashboard/pgs/class.station.php mode change 100644 => 100755 dashboard/pgs/config.inc.php mode change 100644 => 100755 dashboard/pgs/country.csv mode change 100644 => 100755 dashboard/pgs/functions.php mode change 100644 => 100755 dashboard/pgs/liveccs.php mode change 100644 => 100755 dashboard/pgs/liveircddb.php mode change 100644 => 100755 dashboard/pgs/peers.php mode change 100644 => 100755 dashboard/pgs/reflectors.php mode change 100644 => 100755 dashboard/pgs/repeaters.php mode change 100644 => 100755 dashboard/pgs/users.php diff --git a/dashboard/changes.txt b/dashboard/changes.txt old mode 100644 new mode 100755 index 78bc117..5d18d53 --- a/dashboard/changes.txt +++ b/dashboard/changes.txt @@ -1,94 +1,3 @@ -xlx db v2.4.3 - -SECURITY UPDATE - All files updated to fix vulnerabilities - -This release addresses multiple security vulnerabilities including XSS (Cross-Site Scripting), -command injection, path traversal, and SSRF (Server-Side Request Forgery) attacks. - -Files Changed and Security Fixes: - -- "functions.php" - * Added sanitize_output() and sanitize_attribute() helper functions for XSS prevention - * Added validate_callsign(), validate_module(), validate_protocol() input validation functions - * Replaced exec() call in GetSystemUptime() with secure file reading from /proc/uptime - * Added input validation and shell argument escaping to VNStatGetData() - * Added array bounds checking to ParseTime() to prevent errors on malformed input - -- "class.interlink.php" - * Added input validation to SetName() - validates reflector name format - * Added input validation to SetAddress() - validates IP addresses and hostnames - * Added input validation to AddModule(), RemoveModule(), and HasModuleEnabled() - -- "class.node.php" - * Added input validation in constructor for all parameters - * IP addresses validated with filter_var() - * Protocol validated against whitelist - * Callsign format validated with regex - * LinkedModule validated as single A-Z letter - -- "class.parsexml.php" - * Added element name sanitization to prevent XML injection - -- "class.peer.php" - * Added input validation in constructor for all parameters - * Same validation as class.node.php for consistency - -- "class.reflector.php" - * Added path traversal prevention to SetXMLFile(), SetPIDFile(), and SetFlagFile() - * Added SSRF protection to CallHome() - blocks internal/private IP addresses - * Added validation to ReadInterlinkFile() to prevent path traversal - * Added XML entity encoding to PrepareInterlinkXML() and PrepareReflectorXML() - * Added URL validation to SetCallingHome() - * Added missing InterlinkCount(), GetInterlink(), and IsInterlinked() methods - -- "class.station.php" - * Added input validation in constructor for all parameters - * Callsign format validation - * Module validation - -- "modules.php" - * All output wrapped with sanitize_output() to prevent XSS - -- "peers.php" - * All peer data output sanitized with sanitize_output() and sanitize_attribute() - * URL and callsign outputs properly escaped - -- "reflectors.php" - * All XML element data sanitized before output - * Dashboard URLs and reflector names properly escaped - -- "repeaters.php" - * Added input validation for filter parameters - * All node/repeater data sanitized before output - * Flag images and URLs properly escaped - * IP addresses sanitized - -- "traffic.php" - * Added strict whitelist validation for interface parameter - * Interface names validated against configured list only - -- "users.php" - * Added input validation for filter parameters - * All station/user data sanitized before output - * Callsigns, suffixes, and module names properly escaped - -- "index.php" - * Added secure session configuration (HttpOnly, SameSite, Secure flags) - * Added security headers (X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Referrer-Policy) - * Added whitelist validation for 'show' parameter - * Added validation for 'do' and 'callhome' parameters - * All configuration values sanitized before output to HTML - * JavaScript injection prevented in page refresh code - * All meta tags properly escaped - -Security Vulnerabilities Fixed: -- XSS (Cross-Site Scripting) - All user input and XML data now properly escaped -- Command Injection - Removed unsafe exec() calls, added shell argument escaping -- Path Traversal - File paths validated and restricted to expected directories -- SSRF (Server-Side Request Forgery) - CallHome validates URLs and blocks internal IPs -- Session Hijacking - Added HttpOnly, SameSite, and Secure cookie flags -- XML Injection - Element names sanitized, content stripped of tags - xlx db v2.4.1 you can now hide the liveircddb menu button, if you are running your db in https. diff --git a/dashboard/css/layout.css b/dashboard/css/layout.css old mode 100644 new mode 100755 diff --git a/dashboard/favicon.ico b/dashboard/favicon.ico old mode 100644 new mode 100755 diff --git a/dashboard/index.php b/dashboard/index.php old mode 100644 new mode 100755 index b8cc31c..19b8833 --- a/dashboard/index.php +++ b/dashboard/index.php @@ -1,22 +1,9 @@ SetFlagFile("./pgs/country.csv"); $Reflector->SetPIDFile($Service['PIDFile']); @@ -115,14 +81,14 @@ else { - - - - - + + + + + - <?php echo sanitize_output($Reflector->GetReflectorName()); ?> Reflector Dashboard + <?php echo $Reflector->GetReflectorName(); ?> Reflector Dashboard "); if ((BodyStart >= 0) && (BodyEnd > BodyStart)) { @@ -164,14 +130,14 @@ else {
XLX Multiprotocol Gateway Reflector -
   GetReflectorName()); ?> vGetVersion()); ?> - Dashboard v   /  Service uptime: GetServiceUptime()); ?>
+
   GetReflectorName(); ?> vGetVersion(); ?> - Dashboard v   /  Service uptime: GetServiceUptime()); ?>