Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

@@ -27,7 +27,16 @@ if ( \IPS\Theme::designersModeEnabled() )
if ( isset( \IPS\Request::i()->file ) )
{
$file = file_get_contents( \IPS\ROOT_PATH . '/' . \IPS\Request::i()->file );
$realPath = realpath( \IPS\ROOT_PATH . '/themes/' . \IPS\Request::i()->file );
$pathContainer = realpath(\IPS\ROOT_PATH . '/themes/' );
if( $realPath === FALSE OR mb_substr( $realPath, 0, mb_strlen( $pathContainer ) ) !== $pathContainer )
{
\IPS\Output::i()->error( 'node_error', '3C171/8', 403, '' );
exit;
}
$file = file_get_contents( \IPS\ROOT_PATH . '/themes/' . \IPS\Request::i()->file );
\IPS\Output::i()->sendOutput( preg_replace( '#<ips:template.+?\n#', '', $file ), 200, ( mb_substr( \IPS\Request::i()->file, -4 ) === '.css' ) ? 'text/css' : 'text/javascript' );
}