File manager - Edit - /home/ferretapmx/public_html/debug.zip
Back
PK ��\�OF�Z Z debug.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <extension type="plugin" group="system" method="upgrade"> <name>plg_system_debug</name> <author>Joomla! Project</author> <creationDate>2006-12</creationDate> <copyright>(C) 2006 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_DEBUG_XML_DESCRIPTION</description> <namespace path="src">Joomla\Plugin\System\Debug</namespace> <files> <folder plugin="debug">services</folder> <folder>src</folder> </files> <languages> <language tag="en-GB">language/en-GB/plg_system_debug.ini</language> <language tag="en-GB">language/en-GB/plg_system_debug.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="refresh_assets" type="radio" label="PLG_DEBUG_FIELD_REFRESH_ASSETS_LABEL" description="PLG_DEBUG_FIELD_REFRESH_ASSETS_DESC" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="filter_groups" type="usergrouplist" label="PLG_DEBUG_FIELD_ALLOWED_GROUPS_LABEL" multiple="true" layout="joomla.form.field.list-fancy-select" filter="intarray" /> <field name="memory" type="radio" label="PLG_DEBUG_FIELD_MEMORY_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="request" type="radio" label="PLG_DEBUG_FIELD_REQUEST_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="session" type="radio" label="PLG_DEBUG_FIELD_SESSION_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="profile" type="radio" label="PLG_DEBUG_FIELD_PROFILING_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="queries" type="radio" label="PLG_DEBUG_FIELD_QUERIES_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="query_traces" type="radio" label="PLG_DEBUG_FIELD_QUERY_TRACES_LABEL" layout="joomla.form.field.radio.switcher" default="0" showon="queries:1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="query_profiles" type="radio" label="PLG_DEBUG_FIELD_QUERY_PROFILES_LABEL" layout="joomla.form.field.radio.switcher" default="0" showon="queries:1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="query_explains" type="radio" label="PLG_DEBUG_FIELD_QUERY_EXPLAINS_LABEL" layout="joomla.form.field.radio.switcher" default="0" showon="queries:1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="track_request_history" type="radio" label="PLG_DEBUG_FIELD_TRACK_REQUEST_HISTORY_LABEL" description="PLG_DEBUG_FIELD_TRACK_REQUEST_HISTORY_DESC" layout="joomla.form.field.radio.switcher" default="0" filter="integer" > <option value="0">JDISABLED</option> <option value="1">JENABLED</option> </field> </fieldset> <fieldset name="language" label="PLG_DEBUG_LANGUAGE_FIELDSET_LABEL" > <field name="language_errorfiles" type="radio" label="PLG_DEBUG_FIELD_LANGUAGE_ERRORFILES_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="language_files" type="radio" label="PLG_DEBUG_FIELD_LANGUAGE_FILES_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="language_strings" type="radio" label="PLG_DEBUG_FIELD_LANGUAGE_STRING_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="strip-first" type="radio" label="PLG_DEBUG_FIELD_STRIP_FIRST_LABEL" layout="joomla.form.field.radio.switcher" default="1" filter="integer" > <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="strip-prefix" type="textarea" label="PLG_DEBUG_FIELD_STRIP_PREFIX_LABEL" description="PLG_DEBUG_FIELD_STRIP_PREFIX_DESC" cols="30" rows="4" /> <field name="strip-suffix" type="textarea" label="PLG_DEBUG_FIELD_STRIP_SUFFIX_LABEL" description="PLG_DEBUG_FIELD_STRIP_SUFFIX_DESC" cols="30" rows="4" /> </fieldset> <fieldset name="logging" label="PLG_DEBUG_LOGGING_FIELDSET_LABEL" > <field name="logs" type="radio" label="PLG_DEBUG_FIELD_LOGS_LABEL" layout="joomla.form.field.radio.switcher" default="1" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="log-deprecated-core" type="radio" label="PLG_DEBUG_FIELD_LOG_DEPRECATED_CORE_LABEL" layout="joomla.form.field.radio.switcher" default="0" filter="integer" showon="logs:1" > <option value="0">JNO</option> <option value="1">JYES</option> </field> </fieldset> </fields> </config> </extension> PK ��\�Sʉ� � src/Storage/.htaccessnu �7��m <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>PK ��\zVk\� � src/Storage/FileStorage.phpnu �[��� <?php /** * @package Joomla.Plugin * @subpackage System.Debug * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Plugin\System\Debug\Storage; use Joomla\CMS\Factory; use Joomla\CMS\User\UserFactoryInterface; use Joomla\Filesystem\File; use Joomla\Filesystem\Folder; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Stores collected data into files * * @since 4.0.0 */ class FileStorage extends \DebugBar\Storage\FileStorage { /** * Saves collected data * * @param string $id The log id * @param string $data The log data * * @return void * * @since 4.0.0 */ public function save($id, $data) { if (!file_exists($this->dirname)) { Folder::create($this->dirname); } $dataStr = '<?php die(); ?>#(^-^)#' . json_encode($data); File::write($this->makeFilename($id), $dataStr); } /** * Returns collected data with the specified id * * @param string $id The log id * * @return array * * @since 4.0.0 */ public function get($id) { $dataStr = file_get_contents($this->makeFilename($id)); $dataStr = str_replace('<?php die(); ?>#(^-^)#', '', $dataStr); return json_decode($dataStr, true) ?: []; } /** * Returns a metadata about collected data * * @param array $filters Filtering options * @param integer $max The limit, items per page * @param integer $offset The offset * * @return array * * @since 4.0.0 */ public function find(array $filters = [], $max = 20, $offset = 0) { // Loop through all .php files and remember the modified time and id. $files = []; foreach (new \DirectoryIterator($this->dirname) as $file) { if ($file->getExtension() == 'php') { $files[] = [ 'time' => $file->getMTime(), 'id' => $file->getBasename('.php'), ]; } } // Sort the files, newest first usort( $files, function ($a, $b) { if ($a['time'] === $b['time']) { return 0; } return $a['time'] < $b['time'] ? 1 : -1; } ); // Load the metadata and filter the results. $results = []; $i = 0; foreach ($files as $file) { // When filter is empty, skip loading the offset if ($i++ < $offset && empty($filters)) { $results[] = null; continue; } $data = $this->get($file['id']); if (!$this->isSecureToReturnData($data)) { continue; } $meta = $data['__meta']; unset($data); if ($this->filter($meta, $filters)) { $results[] = $meta; } if (\count($results) >= ($max + $offset)) { break; } } return \array_slice($results, $offset, $max); } /** * Get a full path to the file * * @param string $id The log id * * @return string * * @since 4.0.0 */ public function makeFilename($id) { return $this->dirname . basename($id) . '.php'; } /** * Check if the user is allowed to view the request. Users can only see their own requests. * * @param array $data The data item to process * * @return boolean * * @since 4.2.4 */ private function isSecureToReturnData($data): bool { /** * We only started this collector in Joomla 4.2.4 - any older files we have to assume are insecure. */ if (!\array_key_exists('juser', $data)) { return false; } $currentUser = Factory::getUser(); $currentUserId = $currentUser->id; $currentUserSuperAdmin = $currentUser->authorise('core.admin'); /** * Guests aren't allowed to look at other requests because there's no guarantee it's the same guest. Potentially * in the future this could be refined to check the session ID to show some requests. But it's unlikely we want * guests to be using the debug bar anyhow */ if ($currentUserId === 0) { return false; } /** @var \Joomla\CMS\User\User $user */ $user = Factory::getContainer()->get(UserFactoryInterface::class) ->loadUserById($data['juser']['user_id']); // Super users are allowed to look at other users requests. Otherwise users can only see their own requests. if ($currentUserSuperAdmin || $user->id === $currentUserId) { return true; } return false; } } PK ��\�*��I! I! &