10 lines
796 B
PHP
10 lines
796 B
PHP
<?php
|
|
/** Exact public client allowlist for existing8085. Other installations keep their router. */
|
|
function sgfSelectedAsset(array $state,string $path):?string
|
|
{
|
|
if(($state['singleInstallation']??false)!==true||($state['tag']??null)!=='cc50a276c10c')return null;
|
|
$allowed=['/sgf-entry-menu.mjs','/sgf-stock-final.mjs','/sgf-stock-completion.mjs','/sgf-stock-catalogue.mjs','/sgf-service-documents.mjs','/sgf-cash.mjs','/sgf-iva.mjs','/sgf-fiscal-rules.mjs','/sgf-bank.mjs','/sgf-indicators.mjs'];
|
|
if(!in_array($path,$allowed,true))return null;$public=realpath($state['app'].'/public');$file=$state['app'].'/public'.$path;$resolved=realpath($file);
|
|
return $public&&$resolved&&is_file($file)&&!is_link($file)&&strtolower(dirname($resolved))===strtolower($public)?$resolved:null;
|
|
}
|