Panel/Website/_compat_include.php
copilot-swe-agent[bot] 176f532737
feat: relocate billing runtime to module and harden updater panel pathing
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/50299e05-4ee0-4b5b-80e4-bc5f872c106e

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-18 13:46:11 +00:00

11 lines
386 B
PHP

<?php
function website_billing_runtime_file(string $relative): string
{
$target = realpath(__DIR__ . '/../Panel/modules/billing/' . ltrim($relative, '/'));
if ($target === false || strpos($target, realpath(__DIR__ . '/../Panel/modules/billing')) !== 0) {
http_response_code(500);
echo 'Billing runtime file not found.';
exit;
}
return $target;
}