├── .drone.yml ├── .github └── workflows │ └── crowdin-wf-develop.yml ├── .gitignore ├── CHANGELOG ├── README.md ├── access.xml ├── administrator └── components │ └── com_jedchecker │ ├── access.xml │ ├── config.xml │ ├── controller.php │ ├── controllers │ ├── police.raw.php │ └── uploads.php │ ├── jedchecker.php │ ├── language │ ├── af-ZA │ │ ├── af-ZA.com_jedchecker.ini │ │ └── af-ZA.com_jedchecker.sys.ini │ ├── ar-AA │ │ ├── ar-AA.com_jedchecker.ini │ │ └── ar-AA.com_jedchecker.sys.ini │ ├── ar-SA │ │ ├── ar-SA.com_jedchecker.ini │ │ └── ar-SA.com_jedchecker.sys.ini │ ├── be-BY │ │ ├── be-BY.com_jedchecker.ini │ │ └── be-BY.com_jedchecker.sys.ini │ ├── bg-BG │ │ ├── bg-BG.com_jedchecker.ini │ │ └── bg-BG.com_jedchecker.sys.ini │ ├── bn-BD │ │ ├── bn-BD.com_jedchecker.ini │ │ └── bn-BD.com_jedchecker.sys.ini │ ├── ca-ES │ │ ├── ca-ES.com_jedchecker.ini │ │ └── ca-ES.com_jedchecker.sys.ini │ ├── cs-CZ │ │ ├── cs-CZ.com_jedchecker.ini │ │ └── cs-CZ.com_jedchecker.sys.ini │ ├── cy-GB │ │ ├── cy-GB.com_jedchecker.ini │ │ └── cy-GB.com_jedchecker.sys.ini │ ├── da-DK │ │ ├── da-DK.com_jedchecker.ini │ │ └── da-DK.com_jedchecker.sys.ini │ ├── de-AT │ │ ├── de-AT.com_jedchecker.ini │ │ └── de-AT.com_jedchecker.sys.ini │ ├── de-CH │ │ ├── de-CH.com_jedchecker.ini │ │ └── de-CH.com_jedchecker.sys.ini │ ├── de-DE │ │ ├── de-DE.com_jedchecker.ini │ │ └── de-DE.com_jedchecker.sys.ini │ ├── de-LI │ │ ├── de-LI.com_jedchecker.ini │ │ └── de-LI.com_jedchecker.sys.ini │ ├── de-LU │ │ ├── de-LU.com_jedchecker.ini │ │ └── de-LU.com_jedchecker.sys.ini │ ├── el-GR │ │ ├── el-GR.com_jedchecker.ini │ │ └── el-GR.com_jedchecker.sys.ini │ ├── en-AU │ │ ├── en-AU.com_jedchecker.ini │ │ └── en-AU.com_jedchecker.sys.ini │ ├── en-GB │ │ ├── en-GB.com_jedchecker.ini │ │ └── en-GB.com_jedchecker.sys.ini │ ├── en-US │ │ ├── en-US.com_jedchecker.ini │ │ └── en-US.com_jedchecker.sys.ini │ ├── eo-XX │ │ ├── eo-XX.com_jedchecker.ini │ │ └── eo-XX.com_jedchecker.sys.ini │ ├── es-CO │ │ ├── es-CO.com_jedchecker.ini │ │ └── es-CO.com_jedchecker.sys.ini │ ├── es-ES │ │ ├── es-ES.com_jedchecker.ini │ │ └── es-ES.com_jedchecker.sys.ini │ ├── et-EE │ │ ├── et-EE.com_jedchecker.ini │ │ └── et-EE.com_jedchecker.sys.ini │ ├── eu-ES │ │ ├── eu-ES.com_jedchecker.ini │ │ └── eu-ES.com_jedchecker.sys.ini │ ├── fa-AF │ │ ├── fa-AF.com_jedchecker.ini │ │ └── fa-AF.com_jedchecker.sys.ini │ ├── fa-IR │ │ ├── fa-IR.com_jedchecker.ini │ │ └── fa-IR.com_jedchecker.sys.ini │ ├── fi-FI │ │ ├── fi-FI.com_jedchecker.ini │ │ └── fi-FI.com_jedchecker.sys.ini │ ├── fr-CA │ │ ├── fr-CA.com_jedchecker.ini │ │ └── fr-CA.com_jedchecker.sys.ini │ ├── fr-FR │ │ ├── fr-FR.com_jedchecker.ini │ │ └── fr-FR.com_jedchecker.sys.ini │ ├── ga-IE │ │ ├── ga-IE.com_jedchecker.ini │ │ └── ga-IE.com_jedchecker.sys.ini │ ├── he-IL │ │ ├── he-IL.com_jedchecker.ini │ │ └── he-IL.com_jedchecker.sys.ini │ ├── hi-IN │ │ ├── hi-IN.com_jedchecker.ini │ │ └── hi-IN.com_jedchecker.sys.ini │ ├── hr-HR │ │ ├── hr-HR.com_jedchecker.ini │ │ └── hr-HR.com_jedchecker.sys.ini │ ├── hu-HU │ │ ├── hu-HU.com_jedchecker.ini │ │ └── hu-HU.com_jedchecker.sys.ini │ ├── id-ID │ │ ├── id-ID.com_jedchecker.ini │ │ └── id-ID.com_jedchecker.sys.ini │ ├── it-IT │ │ ├── it-IT.com_jedchecker.ini │ │ └── it-IT.com_jedchecker.sys.ini │ ├── ja-JP │ │ ├── ja-JP.com_jedchecker.ini │ │ └── ja-JP.com_jedchecker.sys.ini │ ├── kk-KZ │ │ ├── kk-KZ.com_jedchecker.ini │ │ └── kk-KZ.com_jedchecker.sys.ini │ ├── ko-KR │ │ ├── ko-KR.com_jedchecker.ini │ │ └── ko-KR.com_jedchecker.sys.ini │ ├── ky-KG │ │ ├── ky-KG.com_jedchecker.ini │ │ └── ky-KG.com_jedchecker.sys.ini │ ├── lt-LT │ │ ├── lt-LT.com_jedchecker.ini │ │ └── lt-LT.com_jedchecker.sys.ini │ ├── lv-LV │ │ ├── lv-LV.com_jedchecker.ini │ │ └── lv-LV.com_jedchecker.sys.ini │ ├── nb-NO │ │ ├── nb-NO.com_jedchecker.ini │ │ └── nb-NO.com_jedchecker.sys.ini │ ├── nl-BE │ │ ├── nl-BE.com_jedchecker.ini │ │ └── nl-BE.com_jedchecker.sys.ini │ ├── nl-NL │ │ ├── nl-NL.com_jedchecker.ini │ │ └── nl-NL.com_jedchecker.sys.ini │ ├── no-NO │ │ ├── no-NO.com_jedchecker.ini │ │ └── no-NO.com_jedchecker.sys.ini │ ├── pl-PL │ │ ├── pl-PL.com_jedchecker.ini │ │ └── pl-PL.com_jedchecker.sys.ini │ ├── pt-BR │ │ ├── pt-BR.com_jedchecker.ini │ │ └── pt-BR.com_jedchecker.sys.ini │ ├── pt-PT │ │ ├── pt-PT.com_jedchecker.ini │ │ └── pt-PT.com_jedchecker.sys.ini │ ├── ro-RO │ │ ├── ro-RO.com_jedchecker.ini │ │ └── ro-RO.com_jedchecker.sys.ini │ ├── ru-RU │ │ ├── ru-RU.com_jedchecker.ini │ │ └── ru-RU.com_jedchecker.sys.ini │ ├── si-LK │ │ ├── si-LK.com_jedchecker.ini │ │ └── si-LK.com_jedchecker.sys.ini │ ├── sk-SK │ │ ├── sk-SK.com_jedchecker.ini │ │ └── sk-SK.com_jedchecker.sys.ini │ ├── sl-SI │ │ ├── sl-SI.com_jedchecker.ini │ │ └── sl-SI.com_jedchecker.sys.ini │ ├── sr-RS │ │ ├── sr-RS.com_jedchecker.ini │ │ └── sr-RS.com_jedchecker.sys.ini │ ├── sr-YU │ │ ├── sr-YU.com_jedchecker.ini │ │ └── sr-YU.com_jedchecker.sys.ini │ ├── sv-SE │ │ ├── sv-SE.com_jedchecker.ini │ │ └── sv-SE.com_jedchecker.sys.ini │ ├── ta-IN │ │ ├── ta-IN.com_jedchecker.ini │ │ └── ta-IN.com_jedchecker.sys.ini │ ├── th-TH │ │ ├── th-TH.com_jedchecker.ini │ │ └── th-TH.com_jedchecker.sys.ini │ ├── tr-TR │ │ ├── tr-TR.com_jedchecker.ini │ │ └── tr-TR.com_jedchecker.sys.ini │ ├── uk-UA │ │ ├── uk-UA.com_jedchecker.ini │ │ └── uk-UA.com_jedchecker.sys.ini │ ├── ur-IN │ │ ├── ur-IN.com_jedchecker.ini │ │ └── ur-IN.com_jedchecker.sys.ini │ ├── vi-VN │ │ ├── vi-VN.com_jedchecker.ini │ │ └── vi-VN.com_jedchecker.sys.ini │ ├── zh-CN │ │ ├── zh-CN.com_jedchecker.ini │ │ └── zh-CN.com_jedchecker.sys.ini │ └── zh-TW │ │ ├── zh-TW.com_jedchecker.ini │ │ └── zh-TW.com_jedchecker.sys.ini │ ├── libraries │ ├── helper.php │ └── rules │ │ ├── encoding.ini │ │ ├── encoding.php │ │ ├── errorreporting.ini │ │ ├── errorreporting.php │ │ ├── framework.ini │ │ ├── framework.php │ │ ├── framework_j5legacy.ini │ │ ├── gpl.ini │ │ ├── gpl.php │ │ ├── gpl │ │ ├── compat.txt │ │ └── gnu.txt │ │ ├── jamss.ini │ │ ├── jamss.php │ │ ├── jexec.ini │ │ ├── jexec.php │ │ ├── language.php │ │ ├── xmlfiles.php │ │ ├── xmlinfo.php │ │ ├── xmllicense.php │ │ ├── xmlmanifest.php │ │ ├── xmlmanifest │ │ ├── dtd_component.json │ │ ├── dtd_file.json │ │ ├── dtd_language.json │ │ ├── dtd_library.json │ │ ├── dtd_module.json │ │ ├── dtd_package.json │ │ ├── dtd_plugin.json │ │ └── dtd_template.json │ │ └── xmlupdateserver.php │ ├── models │ ├── item.php │ ├── report.php │ └── rule.php │ └── views │ └── uploads │ ├── tmpl │ └── default.php │ └── view.html.php ├── composer.json ├── composer.lock ├── config.xml ├── crowdin-develop.yml ├── jedchecker.xml ├── manifest.xml ├── media └── com_jedchecker │ ├── css │ ├── j4-style.css │ ├── j4-style.min.css │ ├── style.css │ └── style.min.css │ └── js │ ├── bootstrap.bundle.min.js │ └── script.js ├── renovate.json └── script.php /.drone.yml: -------------------------------------------------------------------------------- 1 | kind: pipeline 2 | name: default 3 | 4 | clone: 5 | depth: 42 6 | 7 | steps: 8 | - name: composer 9 | image: joomlaprojects/docker-tools:develop 10 | commands: 11 | - composer validate --no-check-all --strict 12 | - composer install --no-progress --no-suggest 13 | - name: phpcs 14 | image: joomlaprojects/docker-images:php7.2 15 | commands: 16 | - echo $(date) 17 | - ./vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=./vendor/joomla/coding-standards/Joomla ./src 18 | - echo $(date) 19 | -------------------------------------------------------------------------------- /.github/workflows/crowdin-wf-develop.yml: -------------------------------------------------------------------------------- 1 | name: Crowdin Action 2 | # Controls when the action will run. 3 | on: 4 | push: 5 | branches: [ develop ] 6 | 7 | # Allows you to run this workflow manually from the Actions tab 8 | workflow_dispatch: 9 | 10 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 11 | jobs: 12 | # This workflow contains a single job called "build" 13 | synchronize-with-crowdin: 14 | if: (github.event_name == 'push' && github.repository == 'joomla-extensions/jedchecker') || (github.event_name != 'push') 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@v3 23 | 24 | # Runs the Crowdin action command - https://github.com/crowdin/github-action 25 | - name: crowdin action 26 | uses: crowdin/github-action@v1 27 | with: 28 | # Upload sources to Crowdin 29 | upload_sources: true 30 | # Upload translations to Crowdin, only use true at initial run 31 | upload_translations: false 32 | # Make pull request of Crowdin translations 33 | download_translations: true 34 | # Don't download strings which aren't translated 35 | skip_untranslated_strings: false 36 | # Download translations with pushing to branch 37 | push_translations: true 38 | # To download translations to the specified version branch 39 | localization_branch_name: 'l10n_crowdin_translations' 40 | # Create pull request after pushing to branch 41 | create_pull_request: true 42 | # Configuration file to use 43 | config: 'crowdin-develop.yml' 44 | # Use true for dryrun to test the run without actually processing anything 45 | dryrun_action: false 46 | env: 47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 48 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /packages 3 | /.idea 4 | /builds/build.properties 5 | /source/administrator/components/com_jedchecker/tmp 6 | /tx.exe 7 | /.settings 8 | /.buildpath 9 | /.project 10 | 11 | # Project management 12 | .vscode/ 13 | .editorconfig 14 | .eslintrc.json 15 | .jsbeautifyrc 16 | .jshintrc 17 | .markdownlint.json 18 | jsconfig.json 19 | .php_cs.dist 20 | .php_cs 21 | .gitkeep 22 | 23 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | 2 | 3 | ===================================================================== 4 | JED Checker 2.4.1 - Released 28-Oct-2021 Onward --> 5 | ===================================================================== 6 | 7 | Please follow the changelog in the commit messages on github. 8 | https://github.com/joomla-extensions/jedchecker/commits/master 9 | 10 | ===================================================================== 11 | JED Checker 2.1.1 - 2.1.2 - Released 10-March-2019 12 | ===================================================================== 13 | 14 | ~ Copyright updated to Joomla! / OSM (source files, including the original authors and years) 15 | 16 | ===================================================================== 17 | JED Checker 2.1.0 - Released 9-March-2019 18 | ===================================================================== 19 | + Compatibility with Joomla 4 20 | + Rule INFO_XML 21 | + Update Server Requirement 22 | ~ Copyright updated to Joomla! / OSM 23 | 24 | ===================================================================== 25 | JED Checker 2.0 - Released 2-April-2017 26 | ===================================================================== 27 | ^ Removal of build tools 28 | ~ Copyright updated to Joomla! / OSM 29 | 30 | ===================================================================== 31 | JED Checker 1.7 - Released 23-January-2017 32 | ===================================================================== 33 | + New Update Server rule 34 | + Addition of bootstrap collapses 35 | - Removal of some deprecated Joomla Framework code 36 | + Add ACL 37 | # Fixed some parameters and return types 38 | ~ Further bootstrapping 39 | ~ Language string updates 40 | ^ Minimum PHP version 5.3.10 41 | ^ error_reporting(0) now flags as error (was warning before) 42 | 43 | ===================================================================== 44 | JED Checker 1.6 - Released 26-October-2015 45 | ===================================================================== 46 | ~ phpcs 47 | # uploading zip files no longer displays a warning on Joomla 3.4.4 48 | # updated link to JED listing requirements 49 | + added rule framework, jamss 50 | 51 | ===================================================================== 52 | JED Checker 1.5 - Released 5-November-2015 53 | ===================================================================== 54 | ~ code cleaup and joomla's phpcs compatibility (at least for the rules) 55 | # Fixed unnecessary GPL checks in php files with no code - thanks to Peter van Westen 56 | # Fixed unnecessary JEXEC checks in php files with no code - thanks to Peter van Westen 57 | + added rule to check for error_reporting(0) - thanks to Denis Delici 58 | # JFile not found 59 | 60 | ===================================================================== 61 | LEGEND 62 | ===================================================================== 63 | ! Note 64 | + New feature or addition 65 | ^ Major change 66 | ~ Small change 67 | $ Language change 68 | * Security fix 69 | # Bug fix 70 | - Feature removal 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JED Checker 2 | 3 | This extension is able to check your components, modules or plugins for common errors that will prevent you 4 | from publishing your extension on the JED (Joomla! Extensions Directory). 5 | 6 | If you are a developer and want to contribute to this extension you can fork this repo. 7 | 8 | ## Uploading your package 9 | 10 | After installing this extension in your Joomla! backend, you can use it by uploading a Joomla! extension-package using 11 | the upload-button. Once uploaded, the contents of the package (your files) will be checked against JED-rules. 12 | 13 | ## Adding rules 14 | 15 | If you want to write a rule have a look a the `administrator/components/com_jedchecker/library/rules` folder. 16 | 17 | You just need to add a new file with your rule, for example `yourrule.php`. 18 | 19 | The file `yourrule.php` needs to have a class `jedcheckerRulesYourrule` and that class needs to have a 20 | function that accepts the basedir as parameter. This is all - the component will automatically call 21 | your rule check function. 22 | 23 | If you are going to contribute your rule to the project, then make sure that it follows the joomla coding conventions 24 | and that it passes the code sniffer: http://docs.joomla.org/Joomla_CodeSniffer 25 | 26 | ## Checking on existing files and folders 27 | 28 | The extension also supports a scan of a pre-defined set of existing files and folders. 29 | For this to work, add a list of folders to a textfile `tmp/jed_checker/local.txt`. 30 | There should be a folder on each line. 31 | Once the file exists, a "Check" button becomes visible in the jedchecker-toolbar. Just hit it. 32 | 33 | Example `tmp/jed_checker/local.txt` file: 34 | 35 | components/com_jedchecker 36 | administrator/components/com_jedchecker 37 | plugins/system 38 | 39 | ## History of the Extension 40 | 41 | This extension was previously maintained by Compojoom (Daniel Dimitrov). Other developers that collaborated with the original project were Denis Dulici (mijosoft.com), Riccardo Zorn (fasterjoomla.com), Bernard Toplak, and eaxs (projectfork.net). 42 | 43 | Now, JED Checker is currently supported by Joomla (Open Source Matters). 44 | 45 | ## COPYRIGHT AND DISCLAIMER 46 | 47 | Copyright (C) 2017 - 2019 Open Source Matters, Inc. All rights reserved. 48 | Copyright (C) 2008 - 2016 compojoom.com . All rights reserved. 49 | 50 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 51 | 52 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 53 | 54 | You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. 55 | -------------------------------------------------------------------------------- /access.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/access.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
8 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/controller.php: -------------------------------------------------------------------------------- 1 | 8 | * 02.06.12 9 | * 10 | * @license GNU General Public License version 2 or later; see LICENSE.txt 11 | */ 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | use Joomla\CMS\MVC\Controller\BaseController; 16 | 17 | /** 18 | * Class JedcheckerController 19 | * 20 | * @since 1.0 21 | */ 22 | class JedcheckerController extends BaseController 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/controllers/police.raw.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @license GNU General Public License version 2 or later; see LICENSE.txt 10 | */ 11 | 12 | defined('_JEXEC') or die('Restricted access'); 13 | 14 | use Joomla\CMS\Factory; 15 | use Joomla\CMS\Filesystem\File; 16 | use Joomla\CMS\Filesystem\Folder; 17 | use Joomla\CMS\Filesystem\Path; 18 | use Joomla\CMS\MVC\Controller\BaseController; 19 | 20 | /** 21 | * Class jedcheckerControllerPolice 22 | * 23 | * @since 1.0 24 | */ 25 | class JedcheckerControllerPolice extends BaseController 26 | { 27 | /** 28 | * Runs all the rules on the given directory 29 | * 30 | * @return boolean 31 | */ 32 | public function check() 33 | { 34 | $rule = Factory::getApplication()->input->get('rule'); 35 | 36 | JLoader::discover('jedcheckerRules', JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/'); 37 | 38 | $path = Factory::getConfig()->get('tmp_path') . '/jed_checker/unzipped'; 39 | $class = 'jedcheckerRules' . ucfirst($rule); 40 | 41 | // Stop if the class does not exist 42 | if (!class_exists($class)) 43 | { 44 | return false; 45 | } 46 | 47 | // Loop through each folder and police it 48 | $folders = $this->getFolders(); 49 | 50 | foreach ($folders as $folder) 51 | { 52 | $this->police($class, $folder); 53 | } 54 | 55 | return true; 56 | } 57 | 58 | /** 59 | * Run each rule and echo the result 60 | * 61 | * @param string $class - the class name 62 | * @param string $folder - the folder where the component is located 63 | * 64 | * @return void 65 | */ 66 | protected function police($class, $folder) 67 | { 68 | // Prepare rule properties 69 | $properties = array('basedir' => Path::clean($folder)); 70 | 71 | // Create instance of the rule 72 | $police = new $class($properties); 73 | 74 | // Perform check 75 | $police->check(); 76 | 77 | // Get the report and then print it 78 | $report = $police->get('report'); 79 | 80 | echo $report->getHTML(); 81 | } 82 | 83 | /** 84 | * Get the folders that should be checked 85 | * 86 | * @return array 87 | */ 88 | protected function getFolders() 89 | { 90 | $folders = array(); 91 | 92 | // Add the folders in the "jed_checked/unzipped" folder 93 | $path = Factory::getConfig()->get('tmp_path') . '/jed_checker/unzipped'; 94 | $tmp_folders = Folder::folders($path); 95 | 96 | if (!empty($tmp_folders)) 97 | { 98 | foreach ($tmp_folders as $tmp_folder) 99 | { 100 | $folders[] = $path . '/' . $tmp_folder; 101 | } 102 | } 103 | 104 | // Parse the local.txt file and parse it 105 | $local = Factory::getConfig()->get('tmp_path') . '/jed_checker/local.txt'; 106 | 107 | if (File::exists($local)) 108 | { 109 | $content = file_get_contents($local); 110 | 111 | if (!empty($content)) 112 | { 113 | $lines = explode("\n", $content); 114 | 115 | if (!empty($lines)) 116 | { 117 | foreach ($lines as $line) 118 | { 119 | $line = trim($line); 120 | 121 | if (!empty($line)) 122 | { 123 | if (Folder::exists(JPATH_ROOT . '/' . $line)) 124 | { 125 | $folders[] = JPATH_ROOT . '/' . $line; 126 | } 127 | elseif (Folder::exists($line)) 128 | { 129 | $folders[] = $line; 130 | } 131 | } 132 | } 133 | } 134 | } 135 | } 136 | 137 | return $folders; 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/controllers/uploads.php: -------------------------------------------------------------------------------- 1 | 8 | * 02.06.12 9 | * 10 | * @license GNU General Public License version 2 or later; see LICENSE.txt 11 | */ 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | use Joomla\Archive\Archive; 16 | use Joomla\CMS\Factory; 17 | use Joomla\CMS\Filesystem\File; 18 | use Joomla\CMS\Filesystem\Folder; 19 | use Joomla\CMS\Language\Text; 20 | use Joomla\CMS\MVC\Controller\BaseController; 21 | use Joomla\CMS\Session\Session; 22 | 23 | /** 24 | * Class JedcheckerControllerUploads 25 | * 26 | * @since 1.0 27 | */ 28 | class JedcheckerControllerUploads extends BaseController 29 | { 30 | /** @var string */ 31 | public $path; 32 | 33 | /** @var string */ 34 | public $pathArchive; 35 | 36 | /** @var string */ 37 | public $pathUnzipped; 38 | 39 | /** 40 | * Constructor. 41 | * 42 | */ 43 | public function __construct() 44 | { 45 | $this->path = Factory::getConfig()->get('tmp_path') . '/jed_checker'; 46 | $this->pathArchive = $this->path . '/archives'; 47 | $this->pathUnzipped = $this->path . '/unzipped'; 48 | parent::__construct(); 49 | } 50 | 51 | /** 52 | * basic upload 53 | * 54 | * @return boolean 55 | */ 56 | public function upload() 57 | { 58 | $appl = Factory::getApplication(); 59 | $input = $appl->input; 60 | 61 | // Check the sent token by the form 62 | Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); 63 | 64 | // Gets the uploaded file from the sent form 65 | $file = $input->files->get('extension', null, 'raw'); 66 | 67 | if ($file['tmp_name']) 68 | { 69 | $path = $this->pathArchive; 70 | 71 | // If the archive folder doesn't exist - create it! 72 | if (!Folder::exists($path)) 73 | { 74 | Folder::create($path); 75 | } 76 | else 77 | { 78 | // Let us remove all previous uploads 79 | $archiveFiles = Folder::files($path); 80 | 81 | foreach ($archiveFiles as $archive) 82 | { 83 | if (!File::delete($this->pathArchive . '/' . $archive)) 84 | { 85 | echo 'could not delete' . $archive; 86 | } 87 | } 88 | } 89 | 90 | $file['filepath'] = $path . '/' . strtolower($file['name']); 91 | 92 | // Let us try to upload 93 | if (!File::upload($file['tmp_name'], $file['filepath'], false, true)) 94 | { 95 | // Error in upload - redirect back with an error notice 96 | $appl->enqueueMessage(Text::_('COM_JEDCHECKER_ERROR_UNABLE_TO_UPLOAD_FILE'), 'error'); 97 | $appl->redirect('index.php?option=com_jedchecker&view=uploads'); 98 | 99 | return false; 100 | } 101 | 102 | // Unzip uploaded files 103 | $unzip_result = $this->unzip(); 104 | 105 | $this->setRedirect('index.php?option=com_jedchecker&view=uploads'); 106 | 107 | return true; 108 | } 109 | else 110 | { 111 | $this->setRedirect('index.php?option=com_jedchecker&view=uploads'); 112 | } 113 | 114 | return false; 115 | } 116 | 117 | /** 118 | * unzip the file 119 | * 120 | * @return boolean 121 | */ 122 | public function unzip() 123 | { 124 | $appl = Factory::getApplication(); 125 | 126 | // Form check token 127 | Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); 128 | 129 | // If folder doesn't exist - create it! 130 | if (!Folder::exists($this->pathUnzipped)) 131 | { 132 | Folder::create($this->pathUnzipped); 133 | } 134 | else 135 | { 136 | // Let us remove all previous unzipped files 137 | $folders = Folder::folders($this->pathUnzipped); 138 | 139 | foreach ($folders as $folder) 140 | { 141 | Folder::delete($this->pathUnzipped . '/' . $folder); 142 | } 143 | } 144 | 145 | $file = Folder::files($this->pathArchive); 146 | 147 | $origin = $this->pathArchive . DIRECTORY_SEPARATOR . $file[0]; 148 | $destination = $this->pathUnzipped . DIRECTORY_SEPARATOR . $file[0]; 149 | 150 | try 151 | { 152 | $archive = new Archive; 153 | $result = $archive->extract($origin, $destination); 154 | } 155 | catch (Exception $e) 156 | { 157 | $result = false; 158 | } 159 | 160 | if ($result) 161 | { 162 | // Scan unzipped folders if we find zip file -> unzip them as well 163 | $this->unzipAll($this->pathUnzipped . '/' . $file[0]); 164 | $message = 'COM_JEDCHECKER_UNZIP_SUCCESS'; 165 | $appl->enqueueMessage(Text::_($message)); 166 | } 167 | else 168 | { 169 | $message = 'COM_JEDCHECKER_UNZIP_FAILED'; 170 | } 171 | 172 | // $appl->redirect('index.php?option=com_jedchecker&view=uploads', Text::_($message)); 173 | $message = 'COM_JEDCHECKER_UNZIP_FAILED'; 174 | 175 | return $message; 176 | } 177 | 178 | /** 179 | * Recursively go through each folder and extract the archives 180 | * 181 | * @param string $start - the directory where we start the unzipping from 182 | * 183 | * @return void 184 | */ 185 | public function unzipAll($start) 186 | { 187 | $iterator = new RecursiveDirectoryIterator($start); 188 | 189 | foreach ($iterator as $file) 190 | { 191 | if ($file->isFile()) 192 | { 193 | if (preg_match('/\.(?:zip|tar|tgz|tbz2|tar\.(?:gz|gzip|bz2|bzip2))$/', $file->getFilename(), $matches)) 194 | { 195 | $unzip = $file->getPath() . '/' . $file->getBasename($matches[0]); 196 | 197 | try 198 | { 199 | $archive = new Archive; 200 | $result = $archive->extract($file->getPathname(), $unzip); 201 | } 202 | catch (Exception $e) 203 | { 204 | $result = false; 205 | } 206 | 207 | // Delete the archive once we extract it 208 | if ($result) 209 | { 210 | File::delete($file->getPathname()); 211 | 212 | // Now check the new extracted folder for archive files 213 | $this->unzipAll($unzip); 214 | } 215 | } 216 | } 217 | elseif (!$iterator->isDot()) 218 | { 219 | $this->unzipAll($file->getPathname()); 220 | } 221 | } 222 | } 223 | 224 | /** 225 | * clear tmp folders 226 | * 227 | * @return void 228 | */ 229 | public function clear() 230 | { 231 | if (file_exists($this->path)) 232 | { 233 | $result = Folder::delete($this->path); 234 | 235 | if (!$result) 236 | { 237 | echo 'could not delete ' . $this->path; 238 | $message = 'COM_JEDCHECKER_DELETE_FAILED'; 239 | } 240 | 241 | $message = 'COM_JEDCHECKER_DELETE_SUCCESS'; 242 | 243 | // Factory::getApplication()->redirect('index.php?option=com_jedchecker&view=uploads', Text::_($message)); 244 | $this->setRedirect('index.php?option=com_jedchecker&view=uploads'); 245 | } 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/jedchecker.php: -------------------------------------------------------------------------------- 1 | 8 | * 02.06.12 9 | * 10 | * @license GNU General Public License version 2 or later; see LICENSE.txt 11 | */ 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | use Joomla\CMS\Factory; 16 | use Joomla\CMS\Language\Text; 17 | use Joomla\CMS\MVC\Controller\BaseController; 18 | 19 | if (!Factory::getUser()->authorise('core.manage', 'com_jedchecker')) 20 | { 21 | throw new Exception(Text::_('JERROR_ALERTNOAUTHOR')); 22 | } 23 | 24 | $input = Factory::getApplication()->input; 25 | $view = $input->getCmd('view', ''); 26 | 27 | if ($view === '' && $input->getCmd('task', '') === '') 28 | { 29 | $input->set('view', 'uploads'); 30 | } 31 | 32 | $controller = BaseController::getInstance('jedchecker'); 33 | $controller->execute($input->getCmd('task', '')); 34 | $controller->redirect(); 35 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/af-ZA/af-ZA.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ar-AA/ar-AA.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="مدقق دليل اضافات جوملا" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ar-SA/ar-SA.com_jedchecker.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER_CONFIGURATION="JED Checker Configuration" 3 | COM_JEDCHECKER_UPLOAD_FILE="Upload File" 4 | COM_JEDCHECKER_UPLOAD_WAS_SUCCESSFUL="Upload was successful, next click the Unzip button." 5 | COM_JEDCHECKER_ERROR_UNABLE_TO_UPLOAD_FILE="Upload has failed, ensure that the temporary directory is writable." 6 | COM_JEDCHECKER_UNZIP_SUCCESS="Unzip was successful, next click the Check button." 7 | COM_JEDCHECKER_UNZIP_FAILED="Unzip failed" 8 | COM_JEDCHECKER_RESULTS="JED Checker Results" 9 | COM_JEDCHECKER_CONGRATS="Congratulations! If you use this component then you've most probably developed a Joomla! extension. Now comes the "hard" part - getting it listed in the Joomla Extension Directory (JED). The JED has strict requirements that must be complied with before an extension will be published in the directory. Those requirements can be found here. This component has been built with the aim of simplifying the development process by automatically checking the code for common errors in extensions." 10 | COM_JEDCHECKER_CODE_STANDARDS="However, this is not the only goal. We also aim to have code standards checks, such as those that the JPlatform has. This would ensure that Joomla extension developers are aware of the JPlatform coding standards and this could raise the quality bar in our Joomla community even higher. For this we will need you - have a look at the Github project page. Fork the component, add your code checks and send us your pull requests!" 11 | COM_JEDCHECKER_HOW_TO_USE="How to check your extension using the JED Checker:" 12 | COM_JEDCHECKER_STEP1="Upload your component/plugin/module zip file by using the upload form below" 13 | COM_JEDCHECKER_STEP2="Click on Check and review the results" 14 | COM_JEDCHECKER_WALL_OF_HONOR="Wall of Honour" 15 | COM_JEDCHECKER_CONTRIBUTORS="Contributors" 16 | COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component." 17 | COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="How to Interpret the Results" 18 | COM_JEDCHECKER_RULE_PH2="PHP Files missing JEXEC security" 19 | COM_JEDCHECKER_RULE_PH2_DESC="All the PHP files in your extension needs to have a defined('_JEXEC') or die(); statement in the beginning of each file. This ensures that the file cannot be opened outside of the joomla installation and increases the security of your site." 20 | COM_JEDCHECKER_RULE_PH3="License tag missing or incorrect in XML install file" 21 | COM_JEDCHECKER_RULE_PH3_DESC="An install file should include the license information in a license-tag. The license must be GPL or GPL compatible." 22 | COM_JEDCHECKER_EVERYTHING_SEEMS_TO_BE_FINE_WITH_THAT_RULE="Congratulations, everything seems to be fine with that rule!" 23 | COM_JEDCHECKER_DEVELOPED_BY="JED Checker is a JED proyect." 24 | COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE="JED Checker is incompatible with the PHP version that you run on this site: %s. You would need at least PHP Version %s. Aborting installation" 25 | COM_JEDCHECKER_ERROR_HTML_INDEX_NOT_FOUND="Missing index.html in this directory." 26 | COM_JEDCHECKER_ERROR_JEXEC_NOT_FOUND="The JEXEC security check was not found in this file." 27 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_FOUND="No license tag was found in this XML file." 28 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_GPL="Please check if the license in this file is compatible with the GPL." 29 | COM_JEDCHECKER_RULE="Rule" 30 | COM_JEDCHECKER_ERRORS="Errors" 31 | COM_JEDCHECKER_COMPAT_ISSUES="Compatibility Issues" 32 | COM_JEDCHECKER_IN_LINE="in line" 33 | COM_JEDCHECKER_ERROR_ENCODING="You've used encoding in this file. This is not an error, but a JED editor will have to review this file." 34 | COM_JEDCHECKER_RULE_ENCODING="Base64 or other type of encoding in the files" 35 | COM_JEDCHECKER_RULE_ENCODING_DESC="As developers we are fully aware that the base64 and similar functions have a valid place in extensions (such as URL redirects or data storage). However if you use those to make it harder for users to read your code or to mask backlinks the JED will not accept your listing submission (this is not in the spirit of GPL anyway!). An editor will review your code and determine if the way you use the base64 matches the rules of the JED. This might slow your listing review time. So the rule of thumb is - don't do fishy stuff and avoid encoding your code if possible!" 36 | COM_JEDCHECKER_ERROR_ERRORREPORTING="You've used error_reporting(0) in this file." 37 | COM_JEDCHECKER_RULE_ERRORREPORTING="error_reporting(0) in the files" 38 | COM_JEDCHECKER_RULE_ERRORREPORTING_DESC="Use of error_reporting(0) is discouraged as Joomla provides an error_reporting option in the Global Configuration." 39 | COM_JEDCHECKER_LEAVE_A_REVIEW_JED="If you use this component, please post a rating and a review at the Joomla! Extensions Directory." 40 | COM_JEDCHECKER_INFO="Info" 41 | COM_JEDCHECKER_INFO_XML="Information about extension xml files" 42 | COM_JEDCHECKER_INFO_XML_DESC="The install name of your extension must match your listing name on JED. We scan the xml files and find the value of the name tag. Useful information for the "filename and install as" fields in the jed submission form" 43 | COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: %s" 44 | COM_JEDCHECKER_INFO_XML_VERSION_XML="Version tag has the value: %s" 45 | COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML="The creationDate tag has the value: %s" 46 | COM_JEDCHECKER_RULE_PH1="PHP Headers missing GPL License Notice" 47 | COM_JEDCHECKER_RULE_PH1_DESC="A notice is required on each PHP file stating that the file is licensed GPL (or other compatible accepted license). For more information, please click here." 48 | COM_JEDCHECKER_ERROR_GPL_NOT_FOUND="GPL or compatible license was not found" 49 | COM_JEDCHECKER_PH1_LICENSE_FOUND="GPL license was found" 50 | COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND="GPL compatible license was found" 51 | COM_JEDCHECKER_WARNING="Warning" 52 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_NOT_REMOVED="'ini' file for '%s' rule could not be removed, manual removal recommended." 53 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_NOT_REMOVED="PHP file for '%s' rule could not be removed, manual removal recommended." 54 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED="Removed PHP file for '%s' rule." 55 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED="Removed 'ini' file for '%s' rule." 56 | COM_JEDCHECKER_RULE_FRAMEWORK="Joomla Framework deprecated and unsafe" 57 | COM_JEDCHECKER_RULE_FRAMEWORK_DESC="Warns about Find more info on Joomla backward compatibility for Joomla 3" 58 | COM_JEDCHECKER_ERROR_FRAMEWORK_SUPERGLOBALS="Use of superglobals is strongly discouraged" 59 | COM_JEDCHECKER_ERROR_FRAMEWORK_DIRECTDB="Use of direct database access is strongly discouraged" 60 | COM_JEDCHECKER_RULE_FRAMEWORK_NOTINJ3="Functions deprecated in Joomla 3" 61 | COM_JEDCHECKER_ERROR_FRAMEWORK_NOTINJ3="deprecated in Joomla 3" 62 | COM_JEDCHECKER_ERROR_FRAMEWORK_DS="DS is deprecated in Joomla 3" 63 | COM_JEDCHECKER_ERROR_FRAMEWORK_JERR="JError is deprecated, you should use JFactory::getApplication()->enqueueMessage();" 64 | COM_JEDCHECKER_ERROR_FRAMEWORK_ERRORLOG="error_log and var_dump" 65 | COM_JEDCHECKER_ERROR_FRAMEWORK_DEPRECATED="JRequest is deprecated, you should use JFactory::getApplication()->input;" 66 | COM_JEDCHECKER_ERROR_FRAMEWORK_TODO="TODO statement detected" 67 | COM_JEDCHECKER_ERROR_FRAMEWORK_GIT="Code-versioning folders detected" 68 | COM_JEDCHECKER_ERROR_FRAMEWORK_STRICT="PHP Strict Standards: Only variables should be assigned by reference" 69 | COM_JEDCHECKER_RULE_JAMSS="JAMSS - Joomla! Anti-Malware Scan Script" 70 | COM_JEDCHECKER_RULE_JAMSS_DESC="JAMSS will raise many flags for use of potentially dangerous methods, additionally checking for some known attack signatures. Find out more on the Project's homepage
JAMSS output is very verbose and very useful, hover over any lines to see the details." 71 | COM_JEDCHECKER_ERROR_JAMSS_SUSPICIOUS_FILENAME="Suspicious filename found :" 72 | COM_JEDCHECKER_ERROR_JAMSS_CANNOT_OPEN="Could not check" 73 | COM_JEDCHECKER_ERROR_JAMSS_PATTERN="Pattern found" 74 | COM_JEDCHECKER_ERROR_JAMSS_STRING="String found" 75 | COM_JEDCHECKER_RULE_US1="Update Server Requirement" 76 | COM_JEDCHECKER_RULE_US1_DESC="The use of Update Servers is now required by JED." 77 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND="Update Server tag missing or incorrect in this XML file" 78 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_LINK_NOT_FOUND="Update Server link not found in this XML file" 79 | COM_JEDCHECKER_INFO_XML_UPDATE_SERVER_LINK="The Update Server link in this XML file is: %s" 80 | COM_JEDCHECKER_DELETE_FAILED="Can't delete temporary folder" 81 | COM_JEDCHECKER_DELETE_SUCCESS="Temporary folder deleted!" 82 | COM_JEDCHECKER_EMPTY_UPLOAD_FIELD="Please, select a zipped file to be uploaded" 83 | 84 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ar-SA/ar-SA.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/be-BY/be-BY.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/bg-BG/bg-BG.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker - Joomla разширение за проверка на JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/bn-BD/bn-BD.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ca-ES/ca-ES.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="Verificador JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/cs-CZ/cs-CZ.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/cy-GB/cy-GB.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="Gwirydd JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/da-DK/da-DK.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED tester" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/de-AT/de-AT.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED-Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/de-CH/de-CH.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED-Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/de-DE/de-DE.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED-Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/de-LI/de-LI.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED-Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/de-LU/de-LU.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED-Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/el-GR/el-GR.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="Ελεγκτής JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/en-AU/en-AU.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/en-GB/en-GB.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/en-US/en-US.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/eo-XX/eo-XX.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/es-CO/es-CO.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/es-ES/es-ES.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/et-EE/et-EE.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/eu-ES/eu-ES.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/fa-AF/fa-AF.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/fa-IR/fa-IR.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="بررسی کننده فهرست افزونه‌های جوملا!" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/fi-FI/fi-FI.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED-tarkistaja" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/fr-CA/fr-CA.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="Vérificateur JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/fr-FR/fr-FR.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="Vérificateur JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ga-IE/ga-IE.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/he-IL/he-IL.com_jedchecker.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER_CONFIGURATION="JED Checker Configuration" 3 | COM_JEDCHECKER_UPLOAD_FILE="Upload File" 4 | COM_JEDCHECKER_UPLOAD_WAS_SUCCESSFUL="Upload was successful, next click the Unzip button." 5 | COM_JEDCHECKER_ERROR_UNABLE_TO_UPLOAD_FILE="Upload has failed, ensure that the temporary directory is writable." 6 | COM_JEDCHECKER_UNZIP_SUCCESS="Unzip was successful, next click the Check button." 7 | COM_JEDCHECKER_UNZIP_FAILED="Unzip failed" 8 | COM_JEDCHECKER_RESULTS="JED Checker Results" 9 | COM_JEDCHECKER_CONGRATS="Congratulations! If you use this component then you've most probably developed a Joomla! extension. Now comes the "hard" part - getting it listed in the Joomla Extension Directory (JED). The JED has strict requirements that must be complied with before an extension will be published in the directory. Those requirements can be found here. This component has been built with the aim of simplifying the development process by automatically checking the code for common errors in extensions." 10 | COM_JEDCHECKER_CODE_STANDARDS="However, this is not the only goal. We also aim to have code standards checks, such as those that the JPlatform has. This would ensure that Joomla extension developers are aware of the JPlatform coding standards and this could raise the quality bar in our Joomla community even higher. For this we will need you - have a look at the Github project page. Fork the component, add your code checks and send us your pull requests!" 11 | COM_JEDCHECKER_HOW_TO_USE="How to check your extension using the JED Checker:" 12 | COM_JEDCHECKER_STEP1="Upload your component/plugin/module zip file by using the upload form below" 13 | COM_JEDCHECKER_STEP2="Click on Check and review the results" 14 | COM_JEDCHECKER_WALL_OF_HONOR="Wall of Honour" 15 | COM_JEDCHECKER_CONTRIBUTORS="Contributors" 16 | COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component." 17 | COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="How to Interpret the Results" 18 | COM_JEDCHECKER_RULE_PH2="PHP Files missing JEXEC security" 19 | COM_JEDCHECKER_RULE_PH2_DESC="All the PHP files in your extension needs to have a defined('_JEXEC') or die(); statement in the beginning of each file. This ensures that the file cannot be opened outside of the joomla installation and increases the security of your site." 20 | COM_JEDCHECKER_RULE_PH3="License tag missing or incorrect in XML install file" 21 | COM_JEDCHECKER_RULE_PH3_DESC="An install file should include the license information in a license-tag. The license must be GPL or GPL compatible." 22 | COM_JEDCHECKER_EVERYTHING_SEEMS_TO_BE_FINE_WITH_THAT_RULE="Congratulations, everything seems to be fine with that rule!" 23 | COM_JEDCHECKER_DEVELOPED_BY="JED Checker is a JED proyect." 24 | COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE="JED Checker is incompatible with the PHP version that you run on this site: %s. You would need at least PHP Version %s. Aborting installation" 25 | COM_JEDCHECKER_ERROR_HTML_INDEX_NOT_FOUND="Missing index.html in this directory." 26 | COM_JEDCHECKER_ERROR_JEXEC_NOT_FOUND="The JEXEC security check was not found in this file." 27 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_FOUND="No license tag was found in this XML file." 28 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_GPL="Please check if the license in this file is compatible with the GPL." 29 | COM_JEDCHECKER_RULE="Rule" 30 | COM_JEDCHECKER_ERRORS="Errors" 31 | COM_JEDCHECKER_COMPAT_ISSUES="Compatibility Issues" 32 | COM_JEDCHECKER_IN_LINE="in line" 33 | COM_JEDCHECKER_ERROR_ENCODING="You've used encoding in this file. This is not an error, but a JED editor will have to review this file." 34 | COM_JEDCHECKER_RULE_ENCODING="Base64 or other type of encoding in the files" 35 | COM_JEDCHECKER_RULE_ENCODING_DESC="As developers we are fully aware that the base64 and similar functions have a valid place in extensions (such as URL redirects or data storage). However if you use those to make it harder for users to read your code or to mask backlinks the JED will not accept your listing submission (this is not in the spirit of GPL anyway!). An editor will review your code and determine if the way you use the base64 matches the rules of the JED. This might slow your listing review time. So the rule of thumb is - don't do fishy stuff and avoid encoding your code if possible!" 36 | COM_JEDCHECKER_ERROR_ERRORREPORTING="You've used error_reporting(0) in this file." 37 | COM_JEDCHECKER_RULE_ERRORREPORTING="error_reporting(0) in the files" 38 | COM_JEDCHECKER_RULE_ERRORREPORTING_DESC="Use of error_reporting(0) is discouraged as Joomla provides an error_reporting option in the Global Configuration." 39 | COM_JEDCHECKER_LEAVE_A_REVIEW_JED="If you use this component, please post a rating and a review at the Joomla! Extensions Directory." 40 | COM_JEDCHECKER_INFO="Info" 41 | COM_JEDCHECKER_INFO_XML="Information about extension xml files" 42 | COM_JEDCHECKER_INFO_XML_DESC="The install name of your extension must match your listing name on JED. We scan the xml files and find the value of the name tag. Useful information for the "filename and install as" fields in the jed submission form" 43 | COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: %s" 44 | COM_JEDCHECKER_INFO_XML_VERSION_XML="Version tag has the value: %s" 45 | COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML="The creationDate tag has the value: %s" 46 | COM_JEDCHECKER_RULE_PH1="PHP Headers missing GPL License Notice" 47 | COM_JEDCHECKER_RULE_PH1_DESC="A notice is required on each PHP file stating that the file is licensed GPL (or other compatible accepted license). For more information, please click here." 48 | COM_JEDCHECKER_ERROR_GPL_NOT_FOUND="GPL or compatible license was not found" 49 | COM_JEDCHECKER_PH1_LICENSE_FOUND="GPL license was found" 50 | COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND="GPL compatible license was found" 51 | COM_JEDCHECKER_WARNING="Warning" 52 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_NOT_REMOVED="'ini' file for '%s' rule could not be removed, manual removal recommended." 53 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_NOT_REMOVED="PHP file for '%s' rule could not be removed, manual removal recommended." 54 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED="Removed PHP file for '%s' rule." 55 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED="Removed 'ini' file for '%s' rule." 56 | COM_JEDCHECKER_RULE_FRAMEWORK="Joomla Framework deprecated and unsafe" 57 | COM_JEDCHECKER_RULE_FRAMEWORK_DESC="Warns about Find more info on Joomla backward compatibility for Joomla 3" 58 | COM_JEDCHECKER_ERROR_FRAMEWORK_SUPERGLOBALS="Use of superglobals is strongly discouraged" 59 | COM_JEDCHECKER_ERROR_FRAMEWORK_DIRECTDB="Use of direct database access is strongly discouraged" 60 | COM_JEDCHECKER_RULE_FRAMEWORK_NOTINJ3="Functions deprecated in Joomla 3" 61 | COM_JEDCHECKER_ERROR_FRAMEWORK_NOTINJ3="deprecated in Joomla 3" 62 | COM_JEDCHECKER_ERROR_FRAMEWORK_DS="DS is deprecated in Joomla 3" 63 | COM_JEDCHECKER_ERROR_FRAMEWORK_JERR="JError is deprecated, you should use JFactory::getApplication()->enqueueMessage();" 64 | COM_JEDCHECKER_ERROR_FRAMEWORK_ERRORLOG="error_log and var_dump" 65 | COM_JEDCHECKER_ERROR_FRAMEWORK_DEPRECATED="JRequest is deprecated, you should use JFactory::getApplication()->input;" 66 | COM_JEDCHECKER_ERROR_FRAMEWORK_TODO="TODO statement detected" 67 | COM_JEDCHECKER_ERROR_FRAMEWORK_GIT="Code-versioning folders detected" 68 | COM_JEDCHECKER_ERROR_FRAMEWORK_STRICT="PHP Strict Standards: Only variables should be assigned by reference" 69 | COM_JEDCHECKER_RULE_JAMSS="JAMSS - Joomla! Anti-Malware Scan Script" 70 | COM_JEDCHECKER_RULE_JAMSS_DESC="JAMSS will raise many flags for use of potentially dangerous methods, additionally checking for some known attack signatures. Find out more on the Project's homepage
JAMSS output is very verbose and very useful, hover over any lines to see the details." 71 | COM_JEDCHECKER_ERROR_JAMSS_SUSPICIOUS_FILENAME="Suspicious filename found :" 72 | COM_JEDCHECKER_ERROR_JAMSS_CANNOT_OPEN="Could not check" 73 | COM_JEDCHECKER_ERROR_JAMSS_PATTERN="Pattern found" 74 | COM_JEDCHECKER_ERROR_JAMSS_STRING="String found" 75 | COM_JEDCHECKER_RULE_US1="Update Server Requirement" 76 | COM_JEDCHECKER_RULE_US1_DESC="The use of Update Servers is now required by JED." 77 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND="Update Server tag missing or incorrect in this XML file" 78 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_LINK_NOT_FOUND="Update Server link not found in this XML file" 79 | COM_JEDCHECKER_INFO_XML_UPDATE_SERVER_LINK="The Update Server link in this XML file is: %s" 80 | COM_JEDCHECKER_DELETE_FAILED="Can't delete temporary folder" 81 | COM_JEDCHECKER_DELETE_SUCCESS="Temporary folder deleted!" 82 | COM_JEDCHECKER_EMPTY_UPLOAD_FIELD="Please, select a zipped file to be uploaded" 83 | 84 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/he-IL/he-IL.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/hi-IN/hi-IN.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/hr-HR/hr-HR.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/hu-HU/hu-HU.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/id-ID/id-ID.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/it-IT/it-IT.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="Checker JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ja-JP/ja-JP.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JEDチェッカー" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/kk-KZ/kk-KZ.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED тексерушісі" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ko-KR/ko-KR.com_jedchecker.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER_CONFIGURATION="JED Checker Configuration" 3 | COM_JEDCHECKER_UPLOAD_FILE="Upload File" 4 | COM_JEDCHECKER_UPLOAD_WAS_SUCCESSFUL="Upload was successful, next click the Unzip button." 5 | COM_JEDCHECKER_ERROR_UNABLE_TO_UPLOAD_FILE="Upload has failed, ensure that the temporary directory is writable." 6 | COM_JEDCHECKER_UNZIP_SUCCESS="Unzip was successful, next click the Check button." 7 | COM_JEDCHECKER_UNZIP_FAILED="Unzip failed" 8 | COM_JEDCHECKER_RESULTS="JED Checker Results" 9 | COM_JEDCHECKER_CONGRATS="Congratulations! If you use this component then you've most probably developed a Joomla! extension. Now comes the "hard" part - getting it listed in the Joomla Extension Directory (JED). The JED has strict requirements that must be complied with before an extension will be published in the directory. Those requirements can be found here. This component has been built with the aim of simplifying the development process by automatically checking the code for common errors in extensions." 10 | COM_JEDCHECKER_CODE_STANDARDS="However, this is not the only goal. We also aim to have code standards checks, such as those that the JPlatform has. This would ensure that Joomla extension developers are aware of the JPlatform coding standards and this could raise the quality bar in our Joomla community even higher. For this we will need you - have a look at the Github project page. Fork the component, add your code checks and send us your pull requests!" 11 | COM_JEDCHECKER_HOW_TO_USE="How to check your extension using the JED Checker:" 12 | COM_JEDCHECKER_STEP1="Upload your component/plugin/module zip file by using the upload form below" 13 | COM_JEDCHECKER_STEP2="Click on Check and review the results" 14 | COM_JEDCHECKER_WALL_OF_HONOR="Wall of Honour" 15 | COM_JEDCHECKER_CONTRIBUTORS="Contributors" 16 | COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component." 17 | COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="How to Interpret the Results" 18 | COM_JEDCHECKER_RULE_PH2="PHP Files missing JEXEC security" 19 | COM_JEDCHECKER_RULE_PH2_DESC="All the PHP files in your extension needs to have a defined('_JEXEC') or die(); statement in the beginning of each file. This ensures that the file cannot be opened outside of the joomla installation and increases the security of your site." 20 | COM_JEDCHECKER_RULE_PH3="License tag missing or incorrect in XML install file" 21 | COM_JEDCHECKER_RULE_PH3_DESC="An install file should include the license information in a license-tag. The license must be GPL or GPL compatible." 22 | COM_JEDCHECKER_EVERYTHING_SEEMS_TO_BE_FINE_WITH_THAT_RULE="Congratulations, everything seems to be fine with that rule!" 23 | COM_JEDCHECKER_DEVELOPED_BY="JED Checker is a JED proyect." 24 | COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE="JED Checker is incompatible with the PHP version that you run on this site: %s. You would need at least PHP Version %s. Aborting installation" 25 | COM_JEDCHECKER_ERROR_HTML_INDEX_NOT_FOUND="Missing index.html in this directory." 26 | COM_JEDCHECKER_ERROR_JEXEC_NOT_FOUND="The JEXEC security check was not found in this file." 27 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_FOUND="No license tag was found in this XML file." 28 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_GPL="Please check if the license in this file is compatible with the GPL." 29 | COM_JEDCHECKER_RULE="Rule" 30 | COM_JEDCHECKER_ERRORS="Errors" 31 | COM_JEDCHECKER_COMPAT_ISSUES="Compatibility Issues" 32 | COM_JEDCHECKER_IN_LINE="in line" 33 | COM_JEDCHECKER_ERROR_ENCODING="You've used encoding in this file. This is not an error, but a JED editor will have to review this file." 34 | COM_JEDCHECKER_RULE_ENCODING="Base64 or other type of encoding in the files" 35 | COM_JEDCHECKER_RULE_ENCODING_DESC="As developers we are fully aware that the base64 and similar functions have a valid place in extensions (such as URL redirects or data storage). However if you use those to make it harder for users to read your code or to mask backlinks the JED will not accept your listing submission (this is not in the spirit of GPL anyway!). An editor will review your code and determine if the way you use the base64 matches the rules of the JED. This might slow your listing review time. So the rule of thumb is - don't do fishy stuff and avoid encoding your code if possible!" 36 | COM_JEDCHECKER_ERROR_ERRORREPORTING="You've used error_reporting(0) in this file." 37 | COM_JEDCHECKER_RULE_ERRORREPORTING="error_reporting(0) in the files" 38 | COM_JEDCHECKER_RULE_ERRORREPORTING_DESC="Use of error_reporting(0) is discouraged as Joomla provides an error_reporting option in the Global Configuration." 39 | COM_JEDCHECKER_LEAVE_A_REVIEW_JED="If you use this component, please post a rating and a review at the Joomla! Extensions Directory." 40 | COM_JEDCHECKER_INFO="Info" 41 | COM_JEDCHECKER_INFO_XML="Information about extension xml files" 42 | COM_JEDCHECKER_INFO_XML_DESC="The install name of your extension must match your listing name on JED. We scan the xml files and find the value of the name tag. Useful information for the "filename and install as" fields in the jed submission form" 43 | COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: %s" 44 | COM_JEDCHECKER_INFO_XML_VERSION_XML="Version tag has the value: %s" 45 | COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML="The creationDate tag has the value: %s" 46 | COM_JEDCHECKER_RULE_PH1="PHP Headers missing GPL License Notice" 47 | COM_JEDCHECKER_RULE_PH1_DESC="A notice is required on each PHP file stating that the file is licensed GPL (or other compatible accepted license). For more information, please click here." 48 | COM_JEDCHECKER_ERROR_GPL_NOT_FOUND="GPL or compatible license was not found" 49 | COM_JEDCHECKER_PH1_LICENSE_FOUND="GPL license was found" 50 | COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND="GPL compatible license was found" 51 | COM_JEDCHECKER_WARNING="Warning" 52 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_NOT_REMOVED="'ini' file for '%s' rule could not be removed, manual removal recommended." 53 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_NOT_REMOVED="PHP file for '%s' rule could not be removed, manual removal recommended." 54 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED="Removed PHP file for '%s' rule." 55 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED="Removed 'ini' file for '%s' rule." 56 | COM_JEDCHECKER_RULE_FRAMEWORK="Joomla Framework deprecated and unsafe" 57 | COM_JEDCHECKER_RULE_FRAMEWORK_DESC="Warns about Find more info on Joomla backward compatibility for Joomla 3" 58 | COM_JEDCHECKER_ERROR_FRAMEWORK_SUPERGLOBALS="Use of superglobals is strongly discouraged" 59 | COM_JEDCHECKER_ERROR_FRAMEWORK_DIRECTDB="Use of direct database access is strongly discouraged" 60 | COM_JEDCHECKER_RULE_FRAMEWORK_NOTINJ3="Functions deprecated in Joomla 3" 61 | COM_JEDCHECKER_ERROR_FRAMEWORK_NOTINJ3="deprecated in Joomla 3" 62 | COM_JEDCHECKER_ERROR_FRAMEWORK_DS="DS is deprecated in Joomla 3" 63 | COM_JEDCHECKER_ERROR_FRAMEWORK_JERR="JError is deprecated, you should use JFactory::getApplication()->enqueueMessage();" 64 | COM_JEDCHECKER_ERROR_FRAMEWORK_ERRORLOG="error_log and var_dump" 65 | COM_JEDCHECKER_ERROR_FRAMEWORK_DEPRECATED="JRequest is deprecated, you should use JFactory::getApplication()->input;" 66 | COM_JEDCHECKER_ERROR_FRAMEWORK_TODO="TODO statement detected" 67 | COM_JEDCHECKER_ERROR_FRAMEWORK_GIT="Code-versioning folders detected" 68 | COM_JEDCHECKER_ERROR_FRAMEWORK_STRICT="PHP Strict Standards: Only variables should be assigned by reference" 69 | COM_JEDCHECKER_RULE_JAMSS="JAMSS - Joomla! Anti-Malware Scan Script" 70 | COM_JEDCHECKER_RULE_JAMSS_DESC="JAMSS will raise many flags for use of potentially dangerous methods, additionally checking for some known attack signatures. Find out more on the Project's homepage
JAMSS output is very verbose and very useful, hover over any lines to see the details." 71 | COM_JEDCHECKER_ERROR_JAMSS_SUSPICIOUS_FILENAME="Suspicious filename found :" 72 | COM_JEDCHECKER_ERROR_JAMSS_CANNOT_OPEN="Could not check" 73 | COM_JEDCHECKER_ERROR_JAMSS_PATTERN="Pattern found" 74 | COM_JEDCHECKER_ERROR_JAMSS_STRING="String found" 75 | COM_JEDCHECKER_RULE_US1="Update Server Requirement" 76 | COM_JEDCHECKER_RULE_US1_DESC="The use of Update Servers is now required by JED." 77 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND="Update Server tag missing or incorrect in this XML file" 78 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_LINK_NOT_FOUND="Update Server link not found in this XML file" 79 | COM_JEDCHECKER_INFO_XML_UPDATE_SERVER_LINK="The Update Server link in this XML file is: %s" 80 | COM_JEDCHECKER_DELETE_FAILED="Can't delete temporary folder" 81 | COM_JEDCHECKER_DELETE_SUCCESS="Temporary folder deleted!" 82 | COM_JEDCHECKER_EMPTY_UPLOAD_FIELD="Please, select a zipped file to be uploaded" 83 | 84 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ko-KR/ko-KR.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ky-KG/ky-KG.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/lt-LT/lt-LT.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED tikrintuvas" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/lv-LV/lv-LV.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/nb-NO/nb-NO.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/nl-BE/nl-BE.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Controleur" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/nl-NL/nl-NL.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/no-NO/no-NO.com_jedchecker.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER_CONFIGURATION="JED Checker Configuration" 3 | COM_JEDCHECKER_UPLOAD_FILE="Last opp fil" 4 | COM_JEDCHECKER_UPLOAD_WAS_SUCCESSFUL="Opplastingen var vellykket, klikk nå på 'Pakk ut'-knappen." 5 | COM_JEDCHECKER_ERROR_UNABLE_TO_UPLOAD_FILE="Upload has failed, ensure that the temporary directory is writable." 6 | COM_JEDCHECKER_UNZIP_SUCCESS="Unzip was successful, next click the Check button." 7 | COM_JEDCHECKER_UNZIP_FAILED="Utpakking feilet" 8 | COM_JEDCHECKER_RESULTS="JED Checker Results" 9 | COM_JEDCHECKER_CONGRATS="Congratulations! If you use this component then you've most probably developed a Joomla! extension. Now comes the "hard" part - getting it listed in the Joomla Extension Directory (JED). The JED has strict requirements that must be complied with before an extension will be published in the directory. Those requirements can be found here. This component has been built with the aim of simplifying the development process by automatically checking the code for common errors in extensions." 10 | COM_JEDCHECKER_CODE_STANDARDS="However, this is not the only goal. We also aim to have code standards checks, such as those that the JPlatform has. This would ensure that Joomla extension developers are aware of the JPlatform coding standards and this could raise the quality bar in our Joomla community even higher. For this we will need you - have a look at the Github project page. Fork the component, add your code checks and send us your pull requests!" 11 | COM_JEDCHECKER_HOW_TO_USE="How to check your extension using the JED Checker:" 12 | COM_JEDCHECKER_STEP1="Upload your component/plugin/module zip file by using the upload form below" 13 | COM_JEDCHECKER_STEP2="Click on Check and review the results" 14 | COM_JEDCHECKER_WALL_OF_HONOR="Wall of Honour" 15 | COM_JEDCHECKER_CONTRIBUTORS="Contributors" 16 | COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component." 17 | COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="How to Interpret the Results" 18 | COM_JEDCHECKER_RULE_PH2="PHP Files missing JEXEC security" 19 | COM_JEDCHECKER_RULE_PH2_DESC="All the PHP files in your extension needs to have a defined('_JEXEC') or die(); statement in the beginning of each file. This ensures that the file cannot be opened outside of the joomla installation and increases the security of your site." 20 | COM_JEDCHECKER_RULE_PH3="License tag missing or incorrect in XML install file" 21 | COM_JEDCHECKER_RULE_PH3_DESC="An install file should include the license information in a license-tag. The license must be GPL or GPL compatible." 22 | COM_JEDCHECKER_EVERYTHING_SEEMS_TO_BE_FINE_WITH_THAT_RULE="Congratulations, everything seems to be fine with that rule!" 23 | COM_JEDCHECKER_DEVELOPED_BY="JED Checker is a JED proyect." 24 | COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE="JED Checker is incompatible with the PHP version that you run on this site: %s. You would need at least PHP Version %s. Aborting installation" 25 | COM_JEDCHECKER_ERROR_HTML_INDEX_NOT_FOUND="Missing index.html in this directory." 26 | COM_JEDCHECKER_ERROR_JEXEC_NOT_FOUND="The JEXEC security check was not found in this file." 27 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_FOUND="No license tag was found in this XML file." 28 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_GPL="Please check if the license in this file is compatible with the GPL." 29 | COM_JEDCHECKER_RULE="Regel" 30 | COM_JEDCHECKER_ERRORS="Feil" 31 | COM_JEDCHECKER_COMPAT_ISSUES="Kompatibilitetsproblemer" 32 | COM_JEDCHECKER_IN_LINE="på linje" 33 | COM_JEDCHECKER_ERROR_ENCODING="You've used encoding in this file. This is not an error, but a JED editor will have to review this file." 34 | COM_JEDCHECKER_RULE_ENCODING="Base64 or other type of encoding in the files" 35 | COM_JEDCHECKER_RULE_ENCODING_DESC="As developers we are fully aware that the base64 and similar functions have a valid place in extensions (such as URL redirects or data storage). However if you use those to make it harder for users to read your code or to mask backlinks the JED will not accept your listing submission (this is not in the spirit of GPL anyway!). An editor will review your code and determine if the way you use the base64 matches the rules of the JED. This might slow your listing review time. So the rule of thumb is - don't do fishy stuff and avoid encoding your code if possible!" 36 | COM_JEDCHECKER_ERROR_ERRORREPORTING="You've used error_reporting(0) in this file." 37 | COM_JEDCHECKER_RULE_ERRORREPORTING="error_reporting(0) in the files" 38 | COM_JEDCHECKER_RULE_ERRORREPORTING_DESC="Use of error_reporting(0) is discouraged as Joomla provides an error_reporting option in the Global Configuration." 39 | COM_JEDCHECKER_LEAVE_A_REVIEW_JED="If you use this component, please post a rating and a review at the Joomla! Extensions Directory." 40 | COM_JEDCHECKER_INFO="Informasjon" 41 | COM_JEDCHECKER_INFO_XML="Information about extension xml files" 42 | COM_JEDCHECKER_INFO_XML_DESC="The install name of your extension must match your listing name on JED. We scan the xml files and find the value of the name tag. Useful information for the "filename and install as" fields in the jed submission form" 43 | COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: %s" 44 | COM_JEDCHECKER_INFO_XML_VERSION_XML="Version tag has the value: %s" 45 | COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML="The creationDate tag has the value: %s" 46 | COM_JEDCHECKER_RULE_PH1="PHP Headers missing GPL License Notice" 47 | COM_JEDCHECKER_RULE_PH1_DESC="A notice is required on each PHP file stating that the file is licensed GPL (or other compatible accepted license). For more information, please click here." 48 | COM_JEDCHECKER_ERROR_GPL_NOT_FOUND="GPL or compatible license was not found" 49 | COM_JEDCHECKER_PH1_LICENSE_FOUND="GPL license was found" 50 | COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND="GPL compatible license was found" 51 | COM_JEDCHECKER_WARNING="Advarsel" 52 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_NOT_REMOVED="'ini' file for '%s' rule could not be removed, manual removal recommended." 53 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_NOT_REMOVED="PHP file for '%s' rule could not be removed, manual removal recommended." 54 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED="Removed PHP file for '%s' rule." 55 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED="Removed 'ini' file for '%s' rule." 56 | COM_JEDCHECKER_RULE_FRAMEWORK="Joomla Framework deprecated and unsafe" 57 | COM_JEDCHECKER_RULE_FRAMEWORK_DESC="Warns about Find more info on Joomla backward compatibility for Joomla 3" 58 | COM_JEDCHECKER_ERROR_FRAMEWORK_SUPERGLOBALS="Use of superglobals is strongly discouraged" 59 | COM_JEDCHECKER_ERROR_FRAMEWORK_DIRECTDB="Use of direct database access is strongly discouraged" 60 | COM_JEDCHECKER_RULE_FRAMEWORK_NOTINJ3="Functions deprecated in Joomla 3" 61 | COM_JEDCHECKER_ERROR_FRAMEWORK_NOTINJ3="foreldet i Joomla 3" 62 | COM_JEDCHECKER_ERROR_FRAMEWORK_DS="DS er foreldet i Joomla 3" 63 | COM_JEDCHECKER_ERROR_FRAMEWORK_JERR="JError er foreldet, du bør bruke JFactory::getApplication()->enqueueMessage();" 64 | COM_JEDCHECKER_ERROR_FRAMEWORK_ERRORLOG="error_log og var_dump" 65 | COM_JEDCHECKER_ERROR_FRAMEWORK_DEPRECATED="JRequest er foreldet, du bør bruke JFactory::getApplication()->input;" 66 | COM_JEDCHECKER_ERROR_FRAMEWORK_TODO="TODO-angivelse oppdaget" 67 | COM_JEDCHECKER_ERROR_FRAMEWORK_GIT="Code-versioning folders detected" 68 | COM_JEDCHECKER_ERROR_FRAMEWORK_STRICT="PHP Strict Standards: Only variables should be assigned by reference" 69 | COM_JEDCHECKER_RULE_JAMSS="JAMSS - Joomla! Anti-Malware Scan Script" 70 | COM_JEDCHECKER_RULE_JAMSS_DESC="JAMSS will raise many flags for use of potentially dangerous methods, additionally checking for some known attack signatures. Find out more on the Project's homepage
JAMSS output is very verbose and very useful, hover over any lines to see the details." 71 | COM_JEDCHECKER_ERROR_JAMSS_SUSPICIOUS_FILENAME="Mistenkelige filnavn funnet:" 72 | COM_JEDCHECKER_ERROR_JAMSS_CANNOT_OPEN="Kunne ikke sjekke" 73 | COM_JEDCHECKER_ERROR_JAMSS_PATTERN="Mønsteret ble funnet" 74 | COM_JEDCHECKER_ERROR_JAMSS_STRING="Strengen ble funnet" 75 | COM_JEDCHECKER_RULE_US1="Oppdateringsservers krav" 76 | COM_JEDCHECKER_RULE_US1_DESC="The use of Update Servers is now required by JED." 77 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND="Update Server tag missing or incorrect in this XML file" 78 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_LINK_NOT_FOUND="Update Server link not found in this XML file" 79 | COM_JEDCHECKER_INFO_XML_UPDATE_SERVER_LINK="The Update Server link in this XML file is: %s" 80 | COM_JEDCHECKER_DELETE_FAILED="Kan ikke slette midlertidig mappe" 81 | COM_JEDCHECKER_DELETE_SUCCESS="Midlertidig mappe ble slettet." 82 | COM_JEDCHECKER_EMPTY_UPLOAD_FIELD="Velg en filpakke som skal lastes opp" 83 | 84 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/no-NO/no-NO.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED-sjekk" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/pl-PL/pl-PL.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/pt-BR/pt-BR.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="Verificador JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/pt-PT/pt-PT.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ro-RO/ro-RO.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="Verificator JED" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ru-RU/ru-RU.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/si-LK/si-LK.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/sk-SK/sk-SK.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Overovač" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/sl-SI/sl-SI.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/sr-RS/sr-RS.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/sr-YU/sr-YU.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/sv-SE/sv-SE.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED-kontroll" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ta-IN/ta-IN.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/th-TH/th-TH.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/tr-TR/tr-TR.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Denetleyicisi" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/uk-UA/uk-UA.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/ur-IN/ur-IN.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/vi-VN/vi-VN.com_jedchecker.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER_CONFIGURATION="JED Checker Configuration" 3 | COM_JEDCHECKER_UPLOAD_FILE="Upload File" 4 | COM_JEDCHECKER_UPLOAD_WAS_SUCCESSFUL="Upload was successful, next click the Unzip button." 5 | COM_JEDCHECKER_ERROR_UNABLE_TO_UPLOAD_FILE="Upload has failed, ensure that the temporary directory is writable." 6 | COM_JEDCHECKER_UNZIP_SUCCESS="Unzip was successful, next click the Check button." 7 | COM_JEDCHECKER_UNZIP_FAILED="Unzip failed" 8 | COM_JEDCHECKER_RESULTS="JED Checker Results" 9 | COM_JEDCHECKER_CONGRATS="Congratulations! If you use this component then you've most probably developed a Joomla! extension. Now comes the "hard" part - getting it listed in the Joomla Extension Directory (JED). The JED has strict requirements that must be complied with before an extension will be published in the directory. Those requirements can be found here. This component has been built with the aim of simplifying the development process by automatically checking the code for common errors in extensions." 10 | COM_JEDCHECKER_CODE_STANDARDS="However, this is not the only goal. We also aim to have code standards checks, such as those that the JPlatform has. This would ensure that Joomla extension developers are aware of the JPlatform coding standards and this could raise the quality bar in our Joomla community even higher. For this we will need you - have a look at the Github project page. Fork the component, add your code checks and send us your pull requests!" 11 | COM_JEDCHECKER_HOW_TO_USE="How to check your extension using the JED Checker:" 12 | COM_JEDCHECKER_STEP1="Upload your component/plugin/module zip file by using the upload form below" 13 | COM_JEDCHECKER_STEP2="Click on Check and review the results" 14 | COM_JEDCHECKER_WALL_OF_HONOR="Wall of Honour" 15 | COM_JEDCHECKER_CONTRIBUTORS="Contributors" 16 | COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component." 17 | COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="How to Interpret the Results" 18 | COM_JEDCHECKER_RULE_PH2="PHP Files missing JEXEC security" 19 | COM_JEDCHECKER_RULE_PH2_DESC="All the PHP files in your extension needs to have a defined('_JEXEC') or die(); statement in the beginning of each file. This ensures that the file cannot be opened outside of the joomla installation and increases the security of your site." 20 | COM_JEDCHECKER_RULE_PH3="License tag missing or incorrect in XML install file" 21 | COM_JEDCHECKER_RULE_PH3_DESC="An install file should include the license information in a license-tag. The license must be GPL or GPL compatible." 22 | COM_JEDCHECKER_EVERYTHING_SEEMS_TO_BE_FINE_WITH_THAT_RULE="Congratulations, everything seems to be fine with that rule!" 23 | COM_JEDCHECKER_DEVELOPED_BY="JED Checker is a JED proyect." 24 | COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE="JED Checker is incompatible with the PHP version that you run on this site: %s. You would need at least PHP Version %s. Aborting installation" 25 | COM_JEDCHECKER_ERROR_HTML_INDEX_NOT_FOUND="Missing index.html in this directory." 26 | COM_JEDCHECKER_ERROR_JEXEC_NOT_FOUND="The JEXEC security check was not found in this file." 27 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_FOUND="No license tag was found in this XML file." 28 | COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_GPL="Please check if the license in this file is compatible with the GPL." 29 | COM_JEDCHECKER_RULE="Rule" 30 | COM_JEDCHECKER_ERRORS="Errors" 31 | COM_JEDCHECKER_COMPAT_ISSUES="Compatibility Issues" 32 | COM_JEDCHECKER_IN_LINE="in line" 33 | COM_JEDCHECKER_ERROR_ENCODING="You've used encoding in this file. This is not an error, but a JED editor will have to review this file." 34 | COM_JEDCHECKER_RULE_ENCODING="Base64 or other type of encoding in the files" 35 | COM_JEDCHECKER_RULE_ENCODING_DESC="As developers we are fully aware that the base64 and similar functions have a valid place in extensions (such as URL redirects or data storage). However if you use those to make it harder for users to read your code or to mask backlinks the JED will not accept your listing submission (this is not in the spirit of GPL anyway!). An editor will review your code and determine if the way you use the base64 matches the rules of the JED. This might slow your listing review time. So the rule of thumb is - don't do fishy stuff and avoid encoding your code if possible!" 36 | COM_JEDCHECKER_ERROR_ERRORREPORTING="You've used error_reporting(0) in this file." 37 | COM_JEDCHECKER_RULE_ERRORREPORTING="error_reporting(0) in the files" 38 | COM_JEDCHECKER_RULE_ERRORREPORTING_DESC="Use of error_reporting(0) is discouraged as Joomla provides an error_reporting option in the Global Configuration." 39 | COM_JEDCHECKER_LEAVE_A_REVIEW_JED="If you use this component, please post a rating and a review at the Joomla! Extensions Directory." 40 | COM_JEDCHECKER_INFO="Info" 41 | COM_JEDCHECKER_INFO_XML="Information about extension xml files" 42 | COM_JEDCHECKER_INFO_XML_DESC="The install name of your extension must match your listing name on JED. We scan the xml files and find the value of the name tag. Useful information for the "filename and install as" fields in the jed submission form" 43 | COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: %s" 44 | COM_JEDCHECKER_INFO_XML_VERSION_XML="Version tag has the value: %s" 45 | COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML="The creationDate tag has the value: %s" 46 | COM_JEDCHECKER_RULE_PH1="PHP Headers missing GPL License Notice" 47 | COM_JEDCHECKER_RULE_PH1_DESC="A notice is required on each PHP file stating that the file is licensed GPL (or other compatible accepted license). For more information, please click here." 48 | COM_JEDCHECKER_ERROR_GPL_NOT_FOUND="GPL or compatible license was not found" 49 | COM_JEDCHECKER_PH1_LICENSE_FOUND="GPL license was found" 50 | COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND="GPL compatible license was found" 51 | COM_JEDCHECKER_WARNING="Warning" 52 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_NOT_REMOVED="'ini' file for '%s' rule could not be removed, manual removal recommended." 53 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_NOT_REMOVED="PHP file for '%s' rule could not be removed, manual removal recommended." 54 | COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED="Removed PHP file for '%s' rule." 55 | COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED="Removed 'ini' file for '%s' rule." 56 | COM_JEDCHECKER_RULE_FRAMEWORK="Joomla Framework deprecated and unsafe" 57 | COM_JEDCHECKER_RULE_FRAMEWORK_DESC="Warns about Find more info on Joomla backward compatibility for Joomla 3" 58 | COM_JEDCHECKER_ERROR_FRAMEWORK_SUPERGLOBALS="Use of superglobals is strongly discouraged" 59 | COM_JEDCHECKER_ERROR_FRAMEWORK_DIRECTDB="Use of direct database access is strongly discouraged" 60 | COM_JEDCHECKER_RULE_FRAMEWORK_NOTINJ3="Functions deprecated in Joomla 3" 61 | COM_JEDCHECKER_ERROR_FRAMEWORK_NOTINJ3="deprecated in Joomla 3" 62 | COM_JEDCHECKER_ERROR_FRAMEWORK_DS="DS is deprecated in Joomla 3" 63 | COM_JEDCHECKER_ERROR_FRAMEWORK_JERR="JError is deprecated, you should use JFactory::getApplication()->enqueueMessage();" 64 | COM_JEDCHECKER_ERROR_FRAMEWORK_ERRORLOG="error_log and var_dump" 65 | COM_JEDCHECKER_ERROR_FRAMEWORK_DEPRECATED="JRequest is deprecated, you should use JFactory::getApplication()->input;" 66 | COM_JEDCHECKER_ERROR_FRAMEWORK_TODO="TODO statement detected" 67 | COM_JEDCHECKER_ERROR_FRAMEWORK_GIT="Code-versioning folders detected" 68 | COM_JEDCHECKER_ERROR_FRAMEWORK_STRICT="PHP Strict Standards: Only variables should be assigned by reference" 69 | COM_JEDCHECKER_RULE_JAMSS="JAMSS - Joomla! Anti-Malware Scan Script" 70 | COM_JEDCHECKER_RULE_JAMSS_DESC="JAMSS will raise many flags for use of potentially dangerous methods, additionally checking for some known attack signatures. Find out more on the Project's homepage
JAMSS output is very verbose and very useful, hover over any lines to see the details." 71 | COM_JEDCHECKER_ERROR_JAMSS_SUSPICIOUS_FILENAME="Suspicious filename found :" 72 | COM_JEDCHECKER_ERROR_JAMSS_CANNOT_OPEN="Could not check" 73 | COM_JEDCHECKER_ERROR_JAMSS_PATTERN="Pattern found" 74 | COM_JEDCHECKER_ERROR_JAMSS_STRING="String found" 75 | COM_JEDCHECKER_RULE_US1="Update Server Requirement" 76 | COM_JEDCHECKER_RULE_US1_DESC="The use of Update Servers is now required by JED." 77 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND="Update Server tag missing or incorrect in this XML file" 78 | COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_LINK_NOT_FOUND="Update Server link not found in this XML file" 79 | COM_JEDCHECKER_INFO_XML_UPDATE_SERVER_LINK="The Update Server link in this XML file is: %s" 80 | COM_JEDCHECKER_DELETE_FAILED="Can't delete temporary folder" 81 | COM_JEDCHECKER_DELETE_SUCCESS="Temporary folder deleted!" 82 | COM_JEDCHECKER_EMPTY_UPLOAD_FIELD="Please, select a zipped file to be uploaded" 83 | 84 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/vi-VN/vi-VN.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/zh-CN/zh-CN.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED Checker" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/language/zh-TW/zh-TW.com_jedchecker.sys.ini: -------------------------------------------------------------------------------- 1 | ; Language files have to start with semicolon (;) otherwise we have problems with transifex 2 | COM_JEDCHECKER="JED 檢查程式" 3 | 4 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/encoding.ini: -------------------------------------------------------------------------------- 1 | ; @package Joomla.JEDChecker 2 | ; 3 | ; @copyright Copyright (C) 2017 - 2019 Open Source Matters, Inc. All rights reserved. 4 | ; Copyright (C) 2008 - 2016 compojoom.com . All rights reserved. 5 | ; @author Daniel Dimitrov 6 | ; 7 | ; @license GNU General Public License version 2 or later; see LICENSE.txt 8 | 9 | ; The valid constants to search for 10 | encodings ="base64_decode,base64_encode,zlib_decode,zlib_encode" 11 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/encoding.php: -------------------------------------------------------------------------------- 1 | 8 | * 02.06.12 9 | * 10 | * @license GNU General Public License version 2 or later; see LICENSE.txt 11 | */ 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | use Joomla\CMS\Filesystem\Folder; 16 | use Joomla\CMS\Language\Text; 17 | 18 | // Include the rule base class 19 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/rule.php'; 20 | 21 | // Include the helper class 22 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/libraries/helper.php'; 23 | 24 | /** 25 | * class JedcheckerRulesEncoding 26 | * 27 | * This class checks if base64 encoding is used in the files 28 | * 29 | * @since 1.0 30 | */ 31 | class JedcheckerRulesEncoding extends JEDcheckerRule 32 | { 33 | /** 34 | * The formal ID of this rule. For example: SE1. 35 | * 36 | * @var string 37 | */ 38 | protected $id = 'encoding'; 39 | 40 | /** 41 | * The title or caption of this rule. 42 | * 43 | * @var string 44 | */ 45 | protected $title = 'COM_JEDCHECKER_RULE_ENCODING'; 46 | 47 | /** 48 | * The description of this rule. 49 | * 50 | * @var string 51 | */ 52 | protected $description = 'COM_JEDCHECKER_RULE_ENCODING_DESC'; 53 | 54 | /** 55 | * The ordering value to sort rules in the menu. 56 | * 57 | * @var integer 58 | */ 59 | public static $ordering = 900; 60 | 61 | /** 62 | * Regular expression to look for encoding functions. 63 | * 64 | * @var string 65 | */ 66 | protected $encodingsRegex; 67 | 68 | /** 69 | * Initiates the file search and check 70 | * 71 | * @return void 72 | */ 73 | public function check() 74 | { 75 | // Get the functions to look for 76 | $encodings = explode(',', $this->params->get('encodings')); 77 | 78 | // Prepare regex 79 | foreach ($encodings as $i => $encoding) 80 | { 81 | $encodings[$i] = preg_quote(trim($encoding), '/'); 82 | } 83 | 84 | $this->encodingsRegex = '/' . implode('|', $encodings) . '/i'; 85 | 86 | // Find all php files of the extension 87 | $files = Folder::files($this->basedir, '\.php$', true, true); 88 | 89 | // Iterate through all files 90 | foreach ($files as $file) 91 | { 92 | // Try to find the base64 use in the file 93 | if ($this->find($file)) 94 | { 95 | // The error has been added by the find() method 96 | } 97 | } 98 | } 99 | 100 | /** 101 | * Reads a file and searches for any encoding function defined in the params 102 | * Not a very clever way of doing this, but it should be fine for now 103 | * 104 | * @param string $file The path to the file 105 | * 106 | * @return boolean True if the statement was found, otherwise False. 107 | */ 108 | protected function find($file) 109 | { 110 | $content = file_get_contents($file); 111 | $origContent = JEDCheckerHelper::splitLines($content); 112 | 113 | // Exclude comments 114 | $content = JEDCheckerHelper::cleanPhpCode( 115 | $content, 116 | JEDCheckerHelper::CLEAN_HTML | JEDCheckerHelper::CLEAN_COMMENTS 117 | ); 118 | $content = JEDCheckerHelper::splitLines($content); 119 | 120 | $found = false; 121 | 122 | foreach ($content as $i => $line) 123 | { 124 | if (preg_match($this->encodingsRegex, $line)) 125 | { 126 | $found = true; 127 | $this->report->addWarning($file, Text::_('COM_JEDCHECKER_ERROR_ENCODING'), $i + 1, $origContent[$i]); 128 | } 129 | } 130 | 131 | return $found; 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/errorreporting.ini: -------------------------------------------------------------------------------- 1 | ; @package Joomla.JEDChecker 2 | ; 3 | ; @copyright Copyright (C) 2017 - 2019 Open Source Matters, Inc. All rights reserved. 4 | ; Copyright (C) 2008 - 2016 mijosoft.com . All rights reserved. 5 | ; @author Denis Dulici 6 | ; 7 | ; @license GNU General Public License version 2 or later; see LICENSE.txt 8 | 9 | ; The valid constants to search for 10 | errorreportings="error_reporting(0)" 11 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/errorreporting.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @license GNU General Public License version 2 or later; see LICENSE.txt 10 | */ 11 | 12 | defined('_JEXEC') or die('Restricted access'); 13 | 14 | use Joomla\CMS\Filesystem\Folder; 15 | use Joomla\CMS\Language\Text; 16 | 17 | // Include the rule base class 18 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/rule.php'; 19 | 20 | // Include the helper class 21 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/libraries/helper.php'; 22 | 23 | /** 24 | * JedcheckerRulesErrorreporting 25 | * 26 | * This class searches all files for the php error_reporting function 27 | * Developers are discouraged to use this in their joomla extensions 28 | * as users are able to set the error reporting in the global config 29 | * 30 | * @since 1.5 31 | */ 32 | class JedcheckerRulesErrorreporting extends JEDcheckerRule 33 | { 34 | /** 35 | * The formal ID of this rule. For example: SE1. 36 | * 37 | * @var string 38 | */ 39 | protected $id = 'errorreporting'; 40 | 41 | /** 42 | * The title or caption of this rule. 43 | * 44 | * @var string 45 | */ 46 | protected $title = 'COM_JEDCHECKER_RULE_ERRORREPORTING'; 47 | 48 | /** 49 | * The description of this rule. 50 | * 51 | * @var string 52 | */ 53 | protected $description = 'COM_JEDCHECKER_RULE_ERRORREPORTING_DESC'; 54 | 55 | /** 56 | * Regular expression to look for error_reporting calls. 57 | * 58 | * @var string 59 | */ 60 | protected $errorreportingRegex; 61 | 62 | /** 63 | * The ordering value to sort rules in the menu. 64 | * 65 | * @var integer 66 | */ 67 | public static $ordering = 800; 68 | 69 | /** 70 | * Initiates the file search and check 71 | * 72 | * @return void 73 | */ 74 | public function check() 75 | { 76 | // Get the functions to look for 77 | $codes = explode(',', $this->params->get('errorreportings')); 78 | 79 | // Prepare regex 80 | foreach ($codes as $i => $encoding) 81 | { 82 | $codes[$i] = preg_quote(trim($encoding), '/'); 83 | } 84 | 85 | $this->errorreportingRegex = '/' . implode('|', $codes) . '/i'; 86 | 87 | // Find all php files of the extension 88 | $files = Folder::files($this->basedir, '\.php$', true, true); 89 | 90 | // Iterate through all files 91 | foreach ($files as $file) 92 | { 93 | // Try to find the base64 use in the file 94 | if ($this->find($file)) 95 | { 96 | // The error has been added by the find() method 97 | } 98 | } 99 | } 100 | 101 | /** 102 | * Reads a file and searches for any function defined in the params 103 | * Not a very clever way of doing this, but it should be fine for now 104 | * 105 | * @param string $file - The path to the file 106 | * 107 | * @return boolean True if the statement was found, otherwise False. 108 | */ 109 | protected function find($file) 110 | { 111 | $content = file_get_contents($file); 112 | $origContent = JEDCheckerHelper::splitLines($content); 113 | 114 | // Exclude non-code content 115 | $content = JEDCheckerHelper::cleanPhpCode( 116 | $content, 117 | JEDCheckerHelper::CLEAN_HTML | JEDCheckerHelper::CLEAN_COMMENTS | JEDCheckerHelper::CLEAN_STRINGS 118 | ); 119 | $content = JEDCheckerHelper::splitLines($content); 120 | 121 | $found = false; 122 | 123 | foreach ($content as $i => $line) 124 | { 125 | if (preg_match($this->errorreportingRegex, $line)) 126 | { 127 | $found = true; 128 | $this->report->addWarning($file, Text::_('COM_JEDCHECKER_ERROR_ERRORREPORTING'), $i + 1, $origContent[$i]); 129 | } 130 | } 131 | 132 | return $found; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/framework.ini: -------------------------------------------------------------------------------- 1 | ; @package Joomla.JEDChecker 2 | ; 3 | ; @copyright Copyright (C) 2017 - 2019 Open Source Matters, Inc. All rights reserved. 4 | ; Copyright (C) 2008 - 2016 fasterjoomla.com. All rights reserved. 5 | ; @author Riccardo Zorn 6 | ; 7 | ; @license GNU General Public License version 2 or later; see LICENSE.txt 8 | 9 | ; This is the configuration file of the noframework rule. 10 | 11 | ; A different format for this rule's params. In order to provide accurate messages, we have four main keys 12 | ; - error_groups 13 | ; - warning_groups 14 | ; - notice_groups 15 | ; - compatibility_groups 16 | ; each MUST contain the names of the sub-keys that should trigger a warning or a notice. 17 | ; In case an offending string is found in the file, a warning/notice will be raised with an error message named 18 | ; COM_JEDCHECKER_ERROR_NOFRAMEWORK_ followed by the offending key in uppercase e.g. COM_JEDCHECKER_ERROR_NOFRAMEWORK_SUPERGLOBALS 19 | ; 20 | ; ref: docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_3.0_and_Joomla_Platform_12.1 21 | 22 | leftover_folders="__MACOSX,Desktop.ini,desktop.ini,Thumbs.db,node_modules,php-cs-fixer,phpcs,PHP_CodeSniffer,php_codesniffer,.*,*.bak,*.orig,*.php.*,*.test,*.tmp,*~,*.log,*_log,*.lock,*.pid,*.diff,*.patch,*.phar" 23 | leftover_folders_whitelist=".htaccess" 24 | 25 | error_groups="directdb" 26 | directdb="mysql_connect,mysql_query,mysql_close,mysql_escape_string,new mysqli,mysqli_connect,mysqli_query,mysqli_close,mysqli_escape_string,mysqli_real_escape_string" 27 | 28 | warning_groups="superglobals" 29 | superglobals="$_GET,$_POST,$_SESSION,$_COOKIE,$_FILES" 30 | 31 | notice_groups="errorlog,todo" 32 | errorlog="error_log,var_export,var_dump,print_r,debug_zval_dump" 33 | todo="@TODO" 34 | 35 | compatibility_groups="notinj3,notinj4,notinj5,deprecated,deprecatedinj4,deprecatedinj5,jerr,DS,strict" 36 | notinj3="JUtility::isWinOS,JFTP,JLDAP,JWebClient,JloadResultArray,nameQuote,JRequest::checkToken,JParameter,JElement,JFormFieldEditors,JHtmlImage,JRules,JSimpleXML,JPane,$db->getEscaped,JDate::toMysql,JUtility::sendMail,JUtility::sendAdminMail,JUtility::getToken,JFactory::getXMLParser,JDate::toMysql" 37 | notinj4="JInstallerComponent=>JInstallerAdapterComponent,JInstallerFile=>JInstallerAdapterFile,JInstallerLanguage=>JInstallerAdapterLanguage,JInstallerLibrary=>JInstallerAdapterLibrary,JInstallerModule=>JInstallerAdapterModule,JInstallerPackage=>JInstallerAdapterPackage,JInstallerPlugin=>JInstallerAdapterPlugin,JInstallerTemplate=>JInstallerAdapterTemplate,JSubMenuHelper=>JHtmlSidebar,pagination_item_active=>JLayout joomla.pagination.link,pagination_item_inactive=>JLayout joomla.pagination.link,JVersion::RELEASE,JVersion::DEV_LEVEL,JVersion::BUILD,JHtmlBootstrap::modal=>JHtmlBootstrap::renderModal,JHtml::_('bootstrap.modal'=>JHtml::_('bootstrap.renderModal',JHtmlBatch=>JLayouts,JHtml::_('batch.=>JLayouts,JAccess::$assetPermissionsById,JAccess::$assetPermissionsByName,JAccess::preloadPermissionsParentIdMapping,JAccess::getActions=>JAccess::getActionsFromFile/JAccess::getActionsFromData,JApplicationWebRouter=>joomla/router package,JApplicationWebRouterBase=>joomla/router package,JApplicationWebRouterRest=>joomla/router package,->isSite()=>isClient,->isAdmin()=>isClient,$app->getPageParameters=>getParams,JApplicationHelper::parseXMLLangMetaFile,JCrypt::hasStrongPasswordSupport,JCryptCipher3Des=>JCryptCipherCryptoбJCryptCipherBlowfish=>JCryptCipherCrypto,JCryptCipherMcrypt=>JCryptCipherCrypto,JCryptCipherRijndael256=>JCryptCipherCrypto,JCryptCipherSimpleJCacheStorage::test,JFactory::getXml=>SimpleXMLElement,Factory::getXml=>SimpleXMLElement,JFactory::getEditor=>JEditor::getInstance,Factory::getEditor=>JEditor::getInstance,JFactory::getUri=>Uri::getInstance,Factory::getUri=>Uri::getInstance,JBrowser::isSSLConnection=>JApplicationCms::isSSLConnection,JFilterInput::_,JNode,JTree,JGrid,JArrayHelper=>Joomla\\Utilities\\ArrayHelper,$_PROFILER=>Joomla\\CMS\\Profiler\\Profiler::getInstance,JProfiler::getmicrotime,JProfiler::getMemory,JMail::sendAdminMail,JString=>Joomla\\String\\StringHelper" 38 | notinj5="JFactory::getUser(),Factory::getUser()" 39 | deprecated="JHtmlBehavior::mootools,JHtml::_('behavior.mootools',JRequest,->assignRef" 40 | deprecatedinj4="pagination_list_render=>JLayout joomla.pagination.list,JHtmlSortablelist::sortable=>JHtmlDraggablelist::draggable,JHtml::_('sortablelist.sortable'=>JHtml::_('draggablelist.draggable',JApplicationBase=>Joomla\\Application\\AbstractApplication" 41 | deprecatedinj5="Joomla\\CMS\\Filesystem\\File=>\\Joomla\\Filesystem\\File,Joomla\\CMS\\Filesystem\\FilesystemHelper=>Joomla\\Filesystem\\Helper,Joomla\\CMS\\Filesystem\\Folder=>Joomla\\Filesystem\\Folder,Joomla\\CMS\\Filesystem\\Patcher=>Joomla\\Filesystem\\Patcher,Joomla\\CMS\\Filesystem\\Path=>Joomla\\Filesystem\\Path,Joomla\\CMS\\Filesystem\\Stream=>Joomla\\Filesystem\\Stream,Joomla\\CMS\\Filesystem\\Streams\\StreamString=>Joomla\\Filesystem\\Stream\\StringWrapper,Joomla\\CMS\\Filesystem\\Support\\StringController=>Joomla\\Filesystem\\Support\\StringController" 42 | jerr="JError::" 43 | DS=" DS ,.DS., DS.,.DS " 44 | strict="&JFactory,&JModuleHelper" 45 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/framework.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @license GNU General Public License version 2 or later; see LICENSE.txt 10 | */ 11 | 12 | defined('_JEXEC') or die('Restricted access'); 13 | 14 | use Joomla\CMS\Filesystem\Folder; 15 | use Joomla\CMS\Language\Text; 16 | 17 | // Include the rule base class 18 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/rule.php'; 19 | 20 | // Include the helper class 21 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/libraries/helper.php'; 22 | 23 | /** 24 | * JedcheckerRulesFramework 25 | * 26 | * @since 2014-02-23 27 | * Attempts to identify deprecated code, unsafe code, leftover stuff 28 | */ 29 | class JedcheckerRulesFramework extends JEDcheckerRule 30 | { 31 | /** 32 | * The formal ID of this rule. For example: SE1. 33 | * 34 | * @var string 35 | */ 36 | protected $id = 'Framework'; 37 | 38 | /** 39 | * The title or caption of this rule. 40 | * 41 | * @var string 42 | */ 43 | protected $title = 'COM_JEDCHECKER_RULE_FRAMEWORK'; 44 | 45 | /** 46 | * The description of this rule. 47 | * 48 | * @var string 49 | */ 50 | protected $description = 'COM_JEDCHECKER_RULE_FRAMEWORK_DESC'; 51 | 52 | /** 53 | * The ordering value to sort rules in the menu. 54 | * 55 | * @var integer 56 | */ 57 | public static $ordering = 700; 58 | 59 | protected $tests = false; 60 | 61 | protected $regexLeftoverFolders; 62 | 63 | /** 64 | * Initiates the file search and check 65 | * 66 | * @return void 67 | */ 68 | public function check() 69 | { 70 | // Warn about code versioning files included 71 | $leftoverFolders = $this->params->get('leftover_folders'); 72 | $leftoverFoldersWhitelist = $this->params->get('leftover_folders_whitelist'); 73 | 74 | $this->regexLeftoverFolders = ''; 75 | 76 | if (!empty($leftoverFoldersWhitelist)) 77 | { 78 | $this->regexLeftoverFolders .= 79 | '(?!(?:' 80 | . str_replace(array(',', '\*'), array('|', '.*'), preg_quote($leftoverFoldersWhitelist, '/')) 81 | . '))'; 82 | } 83 | 84 | $this->regexLeftoverFolders .= '(?:' . str_replace(array(',', '\*'), array('|', '.*'), preg_quote($leftoverFolders, '/')) . ')'; 85 | 86 | $regexLeftoverFolders = '^' . $this->regexLeftoverFolders . '$'; 87 | 88 | // Get matched files and folder (w/o default exclusion list) 89 | $folders = Folder::folders($this->basedir, $regexLeftoverFolders, true, true, array(), array()); 90 | $files = Folder::files($this->basedir, $regexLeftoverFolders, true, true, array(), array()); 91 | 92 | if ($folders !== false) 93 | { 94 | // Warn on leftover folders found 95 | foreach ($folders as $folder) 96 | { 97 | $this->report->addWarning($folder, Text::_("COM_JEDCHECKER_ERROR_FRAMEWORK_LEFTOVER_FOLDER")); 98 | } 99 | } 100 | 101 | if ($files !== false) 102 | { 103 | // Warn on leftover files found 104 | foreach ($files as $file) 105 | { 106 | $this->report->addWarning($file, Text::_("COM_JEDCHECKER_ERROR_FRAMEWORK_LEFTOVER_FILE")); 107 | } 108 | } 109 | 110 | $files = Folder::files($this->basedir, '\.php$', true, true); 111 | 112 | foreach ($files as $file) 113 | { 114 | if (!$this->excludeResource($file)) 115 | { 116 | // Process the file 117 | if ($this->find($file)) 118 | { 119 | // Error messages are set by find() based on the errors found. 120 | } 121 | } 122 | } 123 | } 124 | 125 | /** 126 | * Check if the given resource is inside of a leftover folder 127 | * 128 | * @param string $file The file name to test 129 | * 130 | * @return boolean 131 | */ 132 | private function excludeResource($file) 133 | { 134 | return (bool) preg_match('/\/' . $this->regexLeftoverFolders . '\//', $file); 135 | } 136 | 137 | /** 138 | * reads a file and searches for any function defined in the params 139 | * 140 | * @param string $file The file name 141 | * 142 | * @return boolean True if the statement was found, otherwise False. 143 | */ 144 | protected function find($file) 145 | { 146 | $origContent = (array) file($file); 147 | 148 | if (count($origContent) === 0) 149 | { 150 | return false; 151 | } 152 | 153 | $result = false; 154 | 155 | $content = file_get_contents($file); 156 | 157 | // Check BOM 158 | if (strncmp($content, "\xEF\xBB\xBF", 3) === 0) 159 | { 160 | $this->report->addError($file, Text::_('COM_JEDCHECKER_ERROR_FRAMEWORK_BOM_FOUND')); 161 | $result = true; 162 | } 163 | 164 | // Report spaces/tabs/EOLs at the beginning of file 165 | if (strpos(" \t\n\r\v\f", $content[0]) !== false) 166 | { 167 | $this->report->addNotice($file, Text::_('COM_JEDCHECKER_ERROR_FRAMEWORK_LEADING_SPACES')); 168 | $result = true; 169 | } 170 | 171 | // Clean non-code 172 | $cleanContent = JEDCheckerHelper::cleanPhpCode( 173 | $content, 174 | JEDCheckerHelper::CLEAN_HTML | JEDCheckerHelper::CLEAN_COMMENTS | JEDCheckerHelper::CLEAN_STRINGS 175 | ); 176 | $cleanContent = JEDCheckerHelper::resolveAliases($cleanContent); 177 | 178 | // Check short PHP tag 179 | if (preg_match('/<\?\s/', $cleanContent, $match, PREG_OFFSET_CAPTURE)) 180 | { 181 | $lineno = substr_count($cleanContent, "\n", 0, $match[0][1]); 182 | $this->report->addError($file, Text::_('COM_JEDCHECKER_ERROR_FRAMEWORK_SHORT_PHP_TAG'), $lineno + 1, $origContent[$lineno]); 183 | $result = true; 184 | } 185 | 186 | $cleanContentKeepStrings = JEDCheckerHelper::cleanPhpCode( 187 | $content, 188 | JEDCheckerHelper::CLEAN_HTML | JEDCheckerHelper::CLEAN_COMMENTS 189 | ); 190 | 191 | $cleanContent = JEDCheckerHelper::splitLines($cleanContent); 192 | $cleanContentKeepStrings = JEDCheckerHelper::splitLines($cleanContentKeepStrings); 193 | 194 | // Run other tests 195 | foreach ($this->getTests() as $testObject) 196 | { 197 | if ($this->runTest($file, $origContent, $cleanContent, $cleanContentKeepStrings, $testObject)) 198 | { 199 | $result = true; 200 | } 201 | } 202 | 203 | return $result; 204 | } 205 | 206 | /** 207 | * runs tests and reports to the appropriate function if strings match. 208 | * 209 | * @param string $file The file name 210 | * @param array $origContent The file content 211 | * @param array $cleanContent The file content w/o non-code elements 212 | * @param array $cleanContentKeepStrings The file content w/o comments and HTML 213 | * @param object $testObject The test object generated by getTests() 214 | * 215 | * @return boolean 216 | */ 217 | private function runTest($file, $origContent, $cleanContent, $cleanContentKeepStrings, $testObject) 218 | { 219 | // @todo remove as unused? 220 | $error_count = 0; 221 | 222 | foreach ($cleanContent as $line_number => $line) 223 | { 224 | $origLine = $origContent[$line_number]; 225 | 226 | foreach ($testObject->tests as $singleTest) 227 | { 228 | $lineContent = $singleTest->keepStrings ? $cleanContentKeepStrings[$line_number] : $line; 229 | 230 | if (preg_match($singleTest->regex, $lineContent)) 231 | { 232 | $origLine = str_ireplace($singleTest->test, '' . $singleTest->test . '', htmlspecialchars($origLine)); 233 | $error_message = Text::_('COM_JEDCHECKER_ERROR_FRAMEWORK_' . strtoupper($testObject->group)) . ':
' . $origLine . '
'; 234 | 235 | if ($singleTest->replacement !== false) 236 | { 237 | $error_message .= Text::_('COM_JEDCHECKER_ERROR_FRAMEWORK_INSTEAD_USE') . ': ' . $singleTest->replacement; 238 | } 239 | 240 | switch ($testObject->kind) 241 | { 242 | case 'error': 243 | $this->report->addError($file, $error_message, $line_number); 244 | break; 245 | case 'warning': 246 | $this->report->addWarning($file, $error_message, $line_number); 247 | break; 248 | case 'compatibility': 249 | $this->report->addCompat($file, $error_message, $line_number); 250 | break; 251 | default: 252 | // Case 'notice': 253 | $this->report->addNotice($file, $error_message, $line_number); 254 | break; 255 | } 256 | } 257 | 258 | // If you scored 100 errors on a single file, that's enough for now. 259 | if ($error_count > 100) 260 | { 261 | return true; 262 | } 263 | } 264 | } 265 | 266 | return $error_count > 0; 267 | } 268 | 269 | /** 270 | * Lazyloads the tests from the framework.ini params. 271 | * The whole structure depends on the file. The vars 272 | * error_groups, warning_groups, notice_groups, compatibility_groups 273 | * serve as lists of other rules, which are grouped and show a different error message per rule. 274 | * Please note: if you want to add more rules, simply do so in the .ini file 275 | * BUT MAKE SURE that you add the relevant key to the translation files: 276 | * COM_JEDCHECKER_ERROR_NOFRAMEWOR_SOMEKEY 277 | * 278 | * @return array 279 | */ 280 | private function getTests() 281 | { 282 | if (!$this->tests) 283 | { 284 | // Build the test array. Please read the comments in the framework.ini file 285 | $this->tests = array(); 286 | $testNames = array('error','warning','notice','compatibility'); 287 | 288 | foreach ($testNames as $test) 289 | { 290 | foreach (explode(",", $this->params->get($test . '_groups')) as $group) 291 | { 292 | $newTest = new stdClass; 293 | $newTest->group = $group; 294 | $newTest->kind = $test; 295 | $newTest->tests = array(); 296 | 297 | foreach (explode(",", $this->params->get($group)) as $match) 298 | { 299 | if (strpos($match, '=>') !== false) 300 | { 301 | list($match, $replacement) = explode('=>', $match, 2); 302 | } 303 | else 304 | { 305 | $replacement = false; 306 | } 307 | 308 | $testObj = new stdClass; 309 | $testObj->test = $match; 310 | $testObj->regex = $this->generateRegex($match); 311 | $testObj->replacement = $replacement; 312 | $testObj->keepStrings = strpos($match, "'") !== false; 313 | 314 | $newTest->tests[] = $testObj; 315 | } 316 | 317 | $this->tests[] = $newTest; 318 | } 319 | } 320 | 321 | $newTest = new stdClass; 322 | $newTest->group = 'j5legacy'; 323 | $newTest->kind = 'compatibility'; 324 | $newTest->tests = array(); 325 | 326 | // Too many tests for j5legacy group, so that they are extracted to separate file 327 | $j5legacy = parse_ini_file(__DIR__ . '/framework_j5legacy.ini'); 328 | 329 | foreach ($j5legacy as $oldClass => $newClass) 330 | { 331 | $testObj = new stdClass; 332 | $testObj->test = $oldClass; 333 | $testObj->regex = $this->generateRegex($oldClass, true); 334 | $testObj->replacement = $newClass; 335 | $testObj->keepStrings = false; 336 | 337 | $newTest->tests[] = $testObj; 338 | } 339 | 340 | $this->tests[] = $newTest; 341 | } 342 | 343 | return $this->tests; 344 | } 345 | 346 | /** 347 | * Generates regular expression for a given test 348 | * 349 | * @param string $test The string to match 350 | * @param boolean $matchCase True for case-sensitive matching 351 | * 352 | * @return string 353 | */ 354 | private function generateRegex($test, $matchCase = false) 355 | { 356 | $regex = preg_quote($test, '/'); 357 | 358 | // Add word boundary check for rules staring/ending with a letter (to avoid false-positives because of partial match) 359 | if (ctype_alpha($test[0])) 360 | { 361 | $regex = '\b' . $regex; 362 | } 363 | 364 | if (ctype_alpha($test[strlen($test) - 1])) 365 | { 366 | $regex .= '\b'; 367 | } 368 | 369 | return '/' . $regex . '/' . ($matchCase ? '' : 'i'); 370 | } 371 | } 372 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/gpl.ini: -------------------------------------------------------------------------------- 1 | ; @package Joomla.JEDChecker 2 | ; 3 | ; @copyright Copyright (C) 2017 - 2019 Open Source Matters, Inc. All rights reserved. 4 | ; Copyright (C) 2008 - 2016 compojoom.com . All rights reserved. 5 | ; @author Daniel Dimitrov 6 | ; 7 | ; @license GNU General Public License version 2 or later; see LICENSE.txt 8 | 9 | ; This is the configuration file of the GPL rule. 10 | ; ADD all compatible licenses with GPL here 11 | ; 12 | 13 | ; The valid constants to search for 14 | constants="" 15 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/gpl.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @license GNU General Public License version 2 or later; see LICENSE.txt 10 | */ 11 | 12 | defined('_JEXEC') or die('Restricted access'); 13 | 14 | use Joomla\CMS\Filesystem\Folder; 15 | use Joomla\CMS\Language\Text; 16 | 17 | // Include the rule base class 18 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/rule.php'; 19 | 20 | 21 | /** 22 | * class JedcheckerRulesGpl 23 | * 24 | * This class searches all files for the GPL/compatible licenses 25 | * 26 | * @since 1.0 27 | */ 28 | class JedcheckerRulesGpl extends JEDcheckerRule 29 | { 30 | /** 31 | * The formal ID of this rule. For example: SE1. 32 | * 33 | * @var string 34 | */ 35 | protected $id = 'PH1'; 36 | 37 | /** 38 | * The title or caption of this rule. 39 | * 40 | * @var string 41 | */ 42 | protected $title = 'COM_JEDCHECKER_RULE_PH1'; 43 | 44 | /** 45 | * The description of this rule. 46 | * 47 | * @var string 48 | */ 49 | protected $description = 'COM_JEDCHECKER_RULE_PH1_DESC'; 50 | 51 | /** 52 | * The ordering value to sort rules in the menu. 53 | * 54 | * @var integer 55 | */ 56 | public static $ordering = 500; 57 | 58 | /** 59 | * Regular expression to match GPL licenses. 60 | * 61 | * @var string 62 | */ 63 | protected $regexGPLLicenses; 64 | 65 | /** 66 | * Regular expression to match GPL-compatible licenses. 67 | * 68 | * @var string 69 | */ 70 | protected $regexCompatLicenses; 71 | 72 | /** 73 | * Initiates the file search and check 74 | * 75 | * @return void 76 | */ 77 | public function check() 78 | { 79 | $this->report->setDefaultSubtype($this->id); 80 | 81 | // Prepare regexp 82 | $this->init(); 83 | 84 | // Find all php files of the extension 85 | $files = Folder::files($this->basedir, '\.php$', true, true); 86 | 87 | // Iterate through all files 88 | foreach ($files as $file) 89 | { 90 | // Try to find the _JEXEC check in the file 91 | if (!$this->find($file)) 92 | { 93 | // Add as error to the report if it was not found 94 | $this->report->addError($file, Text::_('COM_JEDCHECKER_ERROR_GPL_NOT_FOUND')); 95 | } 96 | } 97 | } 98 | 99 | /** 100 | * Initialization (prepare regular expressions) 101 | * 102 | * @return void 103 | */ 104 | protected function init() 105 | { 106 | $GPLLicenses = (array) file(__DIR__ . '/gpl/gnu.txt'); 107 | $this->regexGPLLicenses = $this->generateRegexp($GPLLicenses); 108 | 109 | $compatLicenses = (array) file(__DIR__ . '/gpl/compat.txt'); 110 | 111 | $extraLicenses = $this->params->get('constants', ''); 112 | $extraLicenses = explode(',', $extraLicenses); 113 | 114 | $compatLicenses = array_merge($compatLicenses, $extraLicenses); 115 | 116 | $this->regexCompatLicenses = $this->generateRegexp($compatLicenses); 117 | } 118 | 119 | /** 120 | * Generate regular expression to match the given list of license names 121 | * @param array $lines List of license names 122 | * 123 | * @return string 124 | */ 125 | protected function generateRegexp($lines) 126 | { 127 | $titles = array(); 128 | $ids = array(); 129 | 130 | foreach ($lines as $line) 131 | { 132 | $line = trim($line); 133 | 134 | if ($line === '' || $line[0] === '#') 135 | { 136 | // Skip empty and commented lines 137 | continue; 138 | } 139 | 140 | $title = $line; 141 | if (substr($line, -1, 1) === ')') 142 | { 143 | // Extract identifier 144 | $pos = strrpos($line, '('); 145 | 146 | if ($pos !== false) 147 | { 148 | $title = trim(substr($line, 0, $pos)); 149 | 150 | $id = trim(substr($line, $pos + 1, -1)); 151 | 152 | if ($id !== '') 153 | { 154 | $id = preg_quote($id, '#'); 155 | $ids[$id] = 1; 156 | } 157 | } 158 | } 159 | 160 | if ($title !== '') 161 | { 162 | $title = preg_quote($title, '#'); 163 | 164 | // Expand vN.N to different version formats 165 | $title = preg_replace('/(?<=\S)\s+v(?=\d)/', ',?\s+(?:v\.?\s*|version\s+)?', $title); 166 | 167 | $title = preg_replace('/\s+/', '\s+', $title); 168 | 169 | $titles[$title] = 1; 170 | } 171 | } 172 | 173 | if (count($titles) === 0) 174 | { 175 | return null; 176 | } 177 | 178 | $titles = implode('|', array_keys($titles)); 179 | 180 | if (count($ids)) 181 | { 182 | $ids = implode('|', array_keys($ids)); 183 | $titles .= 184 | '|\blicense\b.+?(?:' . $ids . ')' . 185 | '|\b(?:' . $ids . ')\s+license\b'; 186 | } 187 | 188 | return '#^.*?(?:' . $titles . ').*?$#im'; 189 | } 190 | 191 | /** 192 | * Reads a file and searches for its license 193 | * 194 | * @param string $file - The path to the file 195 | * 196 | * @return boolean True if the statement was found, otherwise False. 197 | */ 198 | protected function find($file) 199 | { 200 | $content = php_strip_whitespace($file); 201 | 202 | // Check the file is empty, comments-only, or nonexecutable 203 | if (empty($content) || preg_match('#^<\?php\s+(?:$|(?:die|exit)(?:\(\))?;)#', $content)) 204 | { 205 | return true; 206 | } 207 | 208 | // Reload file to preserve comments and line numbers 209 | $content = file_get_contents($file); 210 | 211 | // Remove leading "*" characters from phpDoc-like comments 212 | $content = preg_replace('/^\s*\*/m', '', $content); 213 | 214 | if (preg_match($this->regexGPLLicenses, $content, $match, PREG_OFFSET_CAPTURE)) 215 | { 216 | $lineno = substr_count($content, "\n", 0, $match[0][1]) + 1; 217 | $this->report->addPassed( 218 | $file, 219 | Text::_('COM_JEDCHECKER_PH1_LICENSE_FOUND'), 220 | $lineno, 221 | $match[0][0] 222 | ); 223 | 224 | return true; 225 | } 226 | 227 | if (preg_match($this->regexCompatLicenses, $content, $match, PREG_OFFSET_CAPTURE)) 228 | { 229 | $lineno = substr_count($content, "\n", 0, $match[0][1]) + 1; 230 | $this->report->addWarning( 231 | $file, 232 | Text::_('COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND'), 233 | $lineno, 234 | $match[0][0] 235 | ); 236 | 237 | return true; 238 | } 239 | 240 | return false; 241 | } 242 | } 243 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/gpl/compat.txt: -------------------------------------------------------------------------------- 1 | # Based on: 2 | # https://www.gnu.org/licenses/license-list.en.html 3 | # https://opensource.org/licenses/alphabetical 4 | # https://spdx.org/licenses/ 5 | 6 | # Comments are marked with the "#" character in the first position of the line 7 | 8 | # Each line contains the full name of the license with the optional abbreviation in parenthesis 9 | 10 | # The version of the license (if presented) should be written in the form 11 | # [space][the letter "v"][digit(s)] 12 | # (see examples below) 13 | 14 | 15 | # BSD Licenses 16 | 0-clause BSD License (0BSD) 17 | BSD Zero Clause License 18 | Zero-Clause BSD / Free Public License v1.0.0 19 | 1-clause BSD License (BSD-1-Clause) 20 | BSD 1-Clause License 21 | 2-clause BSD License (BSD-2-Clause) 22 | BSD v2 (BSDv2) 23 | BSD 2-Clause "Simplified" License 24 | BSD-2-Clause Plus Patent License (BSD-2-Clause-Patent) 25 | FreeBSD License 26 | 3-clause BSD License (BSD-3-Clause) 27 | BSD v3 (BSDv3) 28 | BSD 3-Clause "New" or "Revised" License 29 | Modified BSD License 30 | Clear BSD License 31 | 32 | # Other GPL-compatible Licenses 33 | Apache License v2.0 (Apache-2.0) 34 | Artistic License v2.0 (Artistic-2.0) 35 | Berkeley Database License 36 | Boost Software License (BSL-1.0) 37 | CeCILL v2 38 | CeCILL License v2.1 (CECILL-2.1) 39 | CeCILL Free Software License Agreement v2.1 40 | Clarified Artistic License 41 | Cryptix General License 42 | eCos License v2.0 (eCos-2.0) 43 | Educational Community License v2.0 (ECL-2.0) 44 | Eiffel Forum License v2.0 (EFL-2.0) 45 | EU DataGrid Software License (EUDatagrid) 46 | Expat License 47 | Freetype Project License 48 | Historical Permission Notice and Disclaimer (HPND) 49 | Independent JPEG Group License 50 | Intel Open Source License (Intel) 51 | ISC License (ISC) 52 | MIT License (MIT) 53 | Mozilla Public License v2.0 (MPL-2.0) 54 | OpenLDAP License v2.7 55 | OpenLDAP Public License v2.8 (OLDAP-2.8) 56 | Open LDAP Public License v2.8 57 | Public Domain 58 | Python License (Python-2.0) 59 | SGI Free Software License B v2.0 60 | Sleepycat License (Sleepycat) 61 | Sleepycat Software Product License 62 | Standard ML of New Jersey Copyright License 63 | Unicode Data Files and Software License (Unicode-DFS-2016) 64 | Unicode License Agreement - Data Files and Software 65 | Unicode, Inc. License Agreement for Data Files and Software 66 | Universal Permissive License (UPL) 67 | Universal Permissive License v1.0 (UPL-1.0) 68 | University of Illinois/NCSA Open Source License (NCSA) 69 | NCSA/University of Illinois Open Source License 70 | Unlicense 71 | W3C License 72 | W3C Software Notice and License 73 | WTFPL v2 74 | WxWidgets Library License 75 | wxWindows Library License (WXwindows) 76 | X11 License 77 | XFree86 v1.1 License 78 | Zope Public License v2.0 (ZPL-2.0) 79 | Zope Public License v2.1 80 | zlib/libpng License (Zlib) 81 | zlib License 82 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/gpl/gnu.txt: -------------------------------------------------------------------------------- 1 | # GPL Licenses 2 | 3 | # Based on: 4 | # https://www.gnu.org/licenses/license-list.en.html 5 | # https://opensource.org/licenses/alphabetical 6 | # https://spdx.org/licenses/ 7 | 8 | # Comments are marked with the "#" character in the first position of the line 9 | 10 | # Each line contains the full name of the license with the optional abbreviation in parenthesis 11 | 12 | # The version of the license (if presented) should be written in the form 13 | # [space][the letter "v"][digit(s)] 14 | # (see examples below) 15 | 16 | 17 | GNU General Public License 18 | GNU GPL 19 | GNU/GPL 20 | GNU Lesser General Public License 21 | GNU LGPL 22 | GNU/LGPL 23 | 24 | GNU General Public License v2 (GPL-2.0) 25 | //www.gnu.org/licenses/gpl-2.0.html 26 | 27 | GNU General Public License v3 (GPL-3.0) 28 | //www.gnu.org/licenses/gpl-3.0.html 29 | 30 | GNU Affero General Public License v3 (AGPL-3.0) 31 | GNU Affero General Public License (AGPL) v3 32 | GNU Library General Public License v2 (LGPL-2.0) 33 | GNU Lesser General Public License v2.1 (LGPL-2.1) 34 | GNU Lesser General Public License (LGPL) v2.1 35 | GNU Lesser General Public License v3 (LGPL-3.0) 36 | GNU Lesser General Public License (LGPL) v3 37 | 38 | GNU All-Permissive License 39 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/jamss.ini: -------------------------------------------------------------------------------- 1 | ; @package Joomla.JEDChecker 2 | ; 3 | ; @copyright Copyright (C) 2017 - 2019 Open Source Matters, Inc. All rights reserved. 4 | ; Copyright (C) 2008 - 2016 fasterjoomla.com. All rights reserved. 5 | ; Riccardo Zorn 6 | ; 7 | ; @license GNU General Public License version 2 or later; see LICENSE.txt 8 | 9 | ; This is the configuration file of the Jamss rule. 10 | ; 11 | 12 | ; This rule runs the JAMSS checks: https://github.com/btoplak/Joomla-Anti-Malware-Scan-Script/blob/master/jamss.php 13 | ; JAMSS description: This script should be used for searching the infected or malware/backdoor 14 | ; files in Joomla! installations. 15 | ; JAMSS by https://github.com/btoplak 16 | ; no configuration here. 17 | 18 | fileExt="php|php3|php4|php5|phps|html|htaccess|gif" 19 | 20 | ; These format the output: 21 | code="code " 22 | info="? " 23 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/jexec.ini: -------------------------------------------------------------------------------- 1 | ; @package Joomla.JEDChecker 2 | ; 3 | ; @copyright Copyright (C) 2017 - 2019 Open Source Matters, Inc. All rights reserved. 4 | ; Copyright (C) 2008 - 2016 compojoom.com . All rights reserved. 5 | ; @author Daniel Dimitrov 6 | ; eaxs 7 | ; 8 | ; @license GNU General Public License version 2 or later; see LICENSE.txt 9 | 10 | ; This is the configuration file of the JEXEC rule. 11 | ; 12 | 13 | ; The valid constants to search for 14 | constants ="_JEXEC, JPATH_PLATFORM, JPATH_BASE, AKEEBAENGINE, WF_EDITOR" 15 | libfolders="vendor,vendors,composer,libraries" 16 | libfiles="LICENSE,LICENSE.txt,license.txt,composer.json" 17 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/jexec.php: -------------------------------------------------------------------------------- 1 | 8 | * eaxs 9 | * 10 | * @license GNU General Public License version 2 or later; see LICENSE.txt 11 | */ 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | use Joomla\CMS\Language\Text; 16 | 17 | // Include the rule base class 18 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/rule.php'; 19 | 20 | /** 21 | * class JedcheckerRulesJexec 22 | * 23 | * This class searches all files for the _JEXEC check 24 | * which prevents direct file access. 25 | * 26 | * @since 1.0 27 | */ 28 | class JedcheckerRulesJexec extends JEDcheckerRule 29 | { 30 | /** 31 | * The formal ID of this rule. For example: SE1. 32 | * 33 | * @var string 34 | */ 35 | protected $id = 'PH2'; 36 | 37 | /** 38 | * The title or caption of this rule. 39 | * 40 | * @var string 41 | */ 42 | protected $title = 'COM_JEDCHECKER_RULE_PH2'; 43 | 44 | /** 45 | * The description of this rule. 46 | * 47 | * @var string 48 | */ 49 | protected $description = 'COM_JEDCHECKER_RULE_PH2_DESC'; 50 | 51 | /** 52 | * The ordering value to sort rules in the menu. 53 | * 54 | * @var integer 55 | */ 56 | public static $ordering = 600; 57 | 58 | /** 59 | * Regexp to match _JEXEC-like guard 60 | * 61 | * @var string 62 | */ 63 | protected $regex; 64 | 65 | /** 66 | * Regexp to match directories to skip 67 | * 68 | * @var string 69 | */ 70 | protected $regexExcludeFolders; 71 | 72 | /** 73 | * List of files related to libraries 74 | * 75 | * @var array 76 | */ 77 | protected $libFiles; 78 | 79 | /** 80 | * Initiates the file search and check 81 | * 82 | * @return void 83 | */ 84 | public function check() 85 | { 86 | $this->report->setDefaultSubtype($this->id); 87 | 88 | $this->initJexec(); 89 | 90 | // Find all php files of the extension 91 | $files = $this->files($this->basedir); 92 | 93 | // Iterate through all files 94 | foreach ($files as $file) 95 | { 96 | // Try to find the _JEXEC check in the file 97 | if (!$this->find($file)) 98 | { 99 | // Add as error to the report if it was not found 100 | $this->report->addError($file, Text::_('COM_JEDCHECKER_ERROR_JEXEC_NOT_FOUND')); 101 | } 102 | } 103 | } 104 | 105 | /** 106 | * Reads a file and searches for the _JEXEC statement 107 | * 108 | * @param string $file - The path to the file 109 | * 110 | * @return boolean True if the statement was found, otherwise False. 111 | */ 112 | protected function find($file) 113 | { 114 | // Load file and strip comments 115 | $content = php_strip_whitespace($file); 116 | 117 | // Strip BOM (it is checked separately) 118 | $content = preg_replace('/^\xEF\xBB\xBF/', '', $content); 119 | 120 | // Skip empty files 121 | if ($content === '' || preg_match('#^\s*<\?php\s+$#', $content)) 122 | { 123 | return true; 124 | } 125 | 126 | // Check guards 127 | if (preg_match($this->regex, $content)) 128 | { 129 | return true; 130 | } 131 | 132 | return false; 133 | } 134 | 135 | /** 136 | * Prepare regexps aforehand 137 | * 138 | * @return void 139 | */ 140 | protected function initJexec() 141 | { 142 | // Generate regular expression to match JEXEC quard 143 | $defines = $this->params->get('constants'); 144 | $defines = explode(',', $defines); 145 | 146 | foreach ($defines as $i => $define) 147 | { 148 | $defines[$i] = preg_quote(trim($define), '#'); 149 | } 150 | 151 | $use_single_ns = '[0-9A-Za-z_\\\\]+(?: as [0-9A-Za-z_]+?)? ?'; 152 | $use_group_ns = '[0-9A-Za-z_\\\\]+\\\\\\{ ?' . $use_single_ns . '(?:, ?' . $use_single_ns . ' ?)*\\} ?'; 153 | $use_ns = '(?:' . $use_single_ns . '|' . $use_group_ns . ')(?:, ?(?:' . $use_single_ns . '|' . $use_group_ns . '))*'; 154 | $this->regex 155 | = '#^\s*' // at the beginning of the file 156 | . '<\?php\s+' // there is an opening php tag 157 | . '(?:declare ?\(strict_types ?= ?1 ?\) ?; ?)?' // optionally followed by declare(strict_types=1) directive 158 | . '(?:namespace [0-9A-Za-z_\\\\]+ ?; ?)?' // optionally followed by namespace directive 159 | . '(?:use (?:function |const )?' . $use_ns . '; ?)*' // optionally followed by use directives 160 | . '\\\\?defined ?\( ?' // followed by defined test 161 | . '([\'"])(?:' . implode('|', $defines) . ')\1' // of any of given constant 162 | . ' ?\) ?(?:or |\|\| ?)(?:die|exit)\b' // or exit 163 | . '#i'; // (case insensitive) 164 | 165 | // Generate regular expression to match excluded directories 166 | $libfolders = $this->params->get('libfolders'); 167 | $libfolders = explode(',', $libfolders); 168 | 169 | foreach ($libfolders as &$libfolder) 170 | { 171 | $libfolder = preg_quote(trim($libfolder), '#'); 172 | } 173 | 174 | // Prepend libFolders with default Joomla's exclude list 175 | $this->regexExcludeFolders = '#^(?:\.svn|CVS|\.DS_Store|__MACOSX|' . implode('|', $libfolders) . ')$#'; 176 | 177 | // Generate list of libraries fingerprint files 178 | $libFiles = $this->params->get('libfiles'); 179 | $this->libFiles = array_map('trim', explode(',', $libFiles)); 180 | } 181 | 182 | /** 183 | * Collect php files to check (excluding external library directories) 184 | * 185 | * @param string $path The path of the folder to read. 186 | * @param int $level The current hierarchy level. 187 | * 188 | * @return array 189 | * @since 3.0 190 | */ 191 | protected function files($path, $level = 0) 192 | { 193 | $arr = array(); 194 | 195 | // Read the source directory 196 | if ($handle = @opendir($path)) 197 | { 198 | while (($file = readdir($handle)) !== false) 199 | { 200 | // Skip excluded directories 201 | if ($file !== '.' && $file !== '..' && !preg_match($this->regexExcludeFolders, $file)) 202 | { 203 | $fullpath = $path . '/' . $file; 204 | 205 | if (is_dir($fullpath)) 206 | { 207 | if ($level > 0) 208 | { 209 | // Detect and skip external library directories 210 | foreach ($this->libFiles as $libFile) 211 | { 212 | if (is_file($fullpath . '/' . $libFile)) 213 | { 214 | // Skip processing of this directory 215 | continue 2; 216 | } 217 | } 218 | } 219 | 220 | $arr = array_merge($arr, $this->files($fullpath, $level + 1)); 221 | } 222 | elseif (preg_match('/\.php$/', $file)) 223 | { 224 | $arr[] = $fullpath; 225 | } 226 | } 227 | } 228 | 229 | closedir($handle); 230 | } 231 | 232 | return $arr; 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/language.php: -------------------------------------------------------------------------------- 1 | basedir, '\.ini$', true, true); 72 | 73 | // Iterate through all the ini files 74 | foreach ($files as $file) 75 | { 76 | /* Language file format is either tag.extension.ini or tag.extension.sys.ini 77 | (where "tag" is a language code, e.g. en-GB, and "extension" is the extension element name, e.g. com_content) 78 | Joomla!4 allows to skip tag prefix inside of the tag directory 79 | (i.e. to name files as extension.ini and extension.sys.ini) */ 80 | if (preg_match('#(?:^|/)([a-z]{2,3}-[A-Z]{2})(?:[./]\w+)?(?:\.sys)?\.ini$#', $file, $match)) 81 | { 82 | $tag = $match[1]; 83 | 84 | // Try to validate the file 85 | $this->find($file, $tag); 86 | 87 | if ($tag === 'en-GB') 88 | { 89 | $this->populateLangKeys($file); 90 | } 91 | } 92 | } 93 | 94 | // Load default Joomla's translations 95 | $files = version_compare(JVERSION, '4.0', '>=') ? array('joomla.ini', 'lib_joomla.ini') : array('en-GB.ini', 'en-GB.lib_joomla.ini'); 96 | 97 | foreach ($files as $file) 98 | { 99 | $this->populateLangKeys(JPATH_ROOT . '/language/en-GB/' . $file); 100 | $this->populateLangKeys(JPATH_ADMINISTRATOR . '/language/en-GB/' . $file); 101 | } 102 | 103 | // Check JText usage 104 | $files = Folder::files($this->basedir, '\.php$', true, true); 105 | 106 | foreach ($files as $file) 107 | { 108 | $this->findJText($file); 109 | } 110 | } 111 | 112 | /** 113 | * Reads and validates an ini file 114 | * 115 | * @param string $file - The path to the file 116 | * @param string $tag - Language tag code 117 | * 118 | * @return boolean True on success, otherwise False. 119 | */ 120 | protected function find($file, $tag) 121 | { 122 | $content = file_get_contents($file); 123 | 124 | if ($content === false) 125 | { 126 | return false; 127 | } 128 | 129 | // Check EOL format is \n (not \r or \n\r) 130 | if (strpos($content, "\r") !== false) 131 | { 132 | $this->report->addNotice($file, Text::_('COM_JEDCHECKER_LANG_INCORRECT_EOL', false, false)); 133 | } 134 | 135 | $lines = file($file); 136 | 137 | if ($lines === false) 138 | { 139 | return false; 140 | } 141 | 142 | $nLines = count($lines); 143 | $keys = array(); 144 | 145 | // Use mb_check_encoding (if exists) to validate UTF-8 146 | $mbExists = function_exists('mb_check_encoding'); 147 | 148 | for ($lineno = 0; $lineno < $nLines; $lineno++) 149 | { 150 | $startLineno = $lineno + 1; 151 | $line = trim($lines[$lineno]); 152 | 153 | // Check for BOM sequence 154 | if ($lineno === 0 && strncmp($line, "\xEF\xBB\xBF", 3) === 0) 155 | { 156 | $this->report->addWarning($file, Text::_('COM_JEDCHECKER_LANG_BOM_FOUND'), $startLineno); 157 | 158 | // Remove BOM for further checks 159 | $line = substr($line, 3); 160 | } 161 | 162 | // Skip empty lines, comments, and section names 163 | if ($line === '' || $line[0] === ';' || $line[0] === '[') 164 | { 165 | continue; 166 | } 167 | 168 | // Report incorrect comment character 169 | if ($line[0] === '#') 170 | { 171 | $this->report->addError($file, Text::_('COM_JEDCHECKER_LANG_INCORRECT_COMMENT'), $startLineno, $line); 172 | continue; 173 | } 174 | 175 | // Check for "=" character in the line 176 | if (strpos($line, '=') === false) 177 | { 178 | $this->report->addError($file, Text::_('COM_JEDCHECKER_LANG_WRONG_LINE'), $startLineno, $line); 179 | continue; 180 | } 181 | 182 | // Extract key and value 183 | list ($key, $value) = explode('=', $line, 2); 184 | 185 | // Validate key 186 | $key = rtrim($key); 187 | 188 | // Check for empty key 189 | if ($key === '') 190 | { 191 | $this->report->addError($file, Text::_('COM_JEDCHECKER_LANG_KEY_EMPTY'), $startLineno, $line); 192 | continue; 193 | } 194 | 195 | // Check for spaces in the key name 196 | if (preg_match('/\s/', $key)) 197 | { 198 | $this->report->addError($file, Text::_('COM_JEDCHECKER_LANG_KEY_WHITESPACE'), $startLineno, $line); 199 | continue; 200 | } 201 | 202 | // Check for invalid characters (see https://www.php.net/manual/en/function.parse-ini-file.php) 203 | if (strpbrk($key, '{}|&~![()^"') !== false) 204 | { 205 | $this->report->addError($file, Text::_('COM_JEDCHECKER_LANG_KEY_INVALID_CHARACTER'), $startLineno, $line); 206 | continue; 207 | } 208 | 209 | // Check for invalid key names (see https://www.php.net/manual/en/function.parse-ini-file.php) 210 | if (in_array($key, array('null', 'yes', 'no', 'true', 'false', 'on', 'off', 'none'), true)) 211 | { 212 | $this->report->addError($file, Text::_('COM_JEDCHECKER_LANG_KEY_RESERVED'), $startLineno, $line); 213 | continue; 214 | } 215 | 216 | // Check key contains ASCII characters only 217 | if (preg_match('/[\x00-\x1F\x80-\xFF]/', $key)) 218 | { 219 | $this->report->addWarning($file, Text::_('COM_JEDCHECKER_LANG_KEY_NOT_ASCII'), $startLineno, $line); 220 | } 221 | 222 | // Check key is uppercase 223 | if ($key !== strtoupper($key)) 224 | { 225 | $this->report->addWarning($file, Text::_('COM_JEDCHECKER_LANG_KEY_NOT_UPPERCASE'), $startLineno, $line); 226 | } 227 | 228 | // Check for duplicated keys 229 | if (isset($keys[$key])) 230 | { 231 | $this->report->addWarning($file, Text::sprintf('COM_JEDCHECKER_LANG_KEY_DUPLICATED', $keys[$key]), $startLineno, $line); 232 | } 233 | else 234 | { 235 | $keys[$key] = $startLineno; 236 | } 237 | 238 | // Validate value 239 | $value = ltrim($value); 240 | 241 | if (!preg_match('/^"((?>[^"\\\\]+|\\\\.)*)"\s*(;[^"]*)?$/', $value, $matches)) 242 | { 243 | // The value doesn't match INI format 244 | $this->report->addError($file, Text::_('COM_JEDCHECKER_LANG_TRANSLATION_ERROR'), $startLineno, $line); 245 | continue; 246 | } 247 | 248 | // Get value w/o comment 249 | $value = $matches[1]; 250 | 251 | // Check for empty value 252 | if ($value === '') 253 | { 254 | $this->report->addNotice($file, Text::_('COM_JEDCHECKER_LANG_TRANSLATION_EMPTY'), $startLineno, $line); 255 | continue; 256 | } 257 | 258 | // Check it's a valid UTF-8 string 259 | $validUTF8 = $mbExists ? mb_check_encoding($value, 'UTF-8') : preg_match('//u', $value); 260 | 261 | if (!$validUTF8) 262 | { 263 | $this->report->addWarning($file, Text::_('COM_JEDCHECKER_LANG_INVALID_UTF8'), $startLineno, $line); 264 | } 265 | 266 | // Process backwards compatibility break introduced in Joomla 5.0.1 267 | if (preg_match('/\\\\[\\\\\\$]/', $value)) 268 | { 269 | $this->report->addWarning($file, Text::_('COM_JEDCHECKER_LANG_JOOMLA501_BC'), $startLineno, $line); 270 | } 271 | 272 | // The code below detects incorrect format of numbered placeholders (e.g. "%1s" instead of "%1$s") 273 | 274 | // Count numbered placeholders in the string (e.g. "%1s") 275 | $count = preg_match_all('/(?<=^|[^%])%(\d+)\w/', $value, $matches, PREG_SET_ORDER); 276 | 277 | if ($count) 278 | { 279 | // To avoid false-positives (e.g. %10s for a ten-characters-wide output string in a CLI), 280 | // we check that placeholder numbers form a sequence from 1 to N. 281 | 282 | $maxNumber = 0; 283 | 284 | foreach ($matches as $match) 285 | { 286 | $maxNumber = max($maxNumber, (int) $match[1]); 287 | } 288 | 289 | // If placeholder numbers form a sequence, the maximal value is equal to the number of elements 290 | if ($maxNumber === $count) 291 | { 292 | $this->report->addWarning($file, Text::_('COM_JEDCHECKER_LANG_INCORRECT_ARGNUM'), $startLineno, $line); 293 | } 294 | } 295 | 296 | // Some extra checks for en-GB only (to don't duplicate false-positives) 297 | if ($tag === 'en-GB') 298 | { 299 | // Check spaces around (but allow trailing space after colon) 300 | if (preg_match('/^\s|[^:]\s+$/', $value)) 301 | { 302 | $this->report->addNotice($file, Text::_('COM_JEDCHECKER_LANG_SPACES_AROUND'), $startLineno, $line); 303 | } 304 | } 305 | } 306 | 307 | // All checks passed. Return true 308 | return true; 309 | } 310 | 311 | /** 312 | * Appends keys from INI file to the list 313 | * 314 | * @param string $file Language INI-file name 315 | * 316 | * @return void 317 | */ 318 | protected function populateLangKeys($file) 319 | { 320 | if (is_file($file)) 321 | { 322 | $data = @parse_ini_file($file); 323 | 324 | if (is_array($data)) 325 | { 326 | $this->langKeys = array_replace($this->langKeys, $data); 327 | } 328 | } 329 | } 330 | 331 | /** 332 | * Reads PHP files and checks JText arguments 333 | * 334 | * @param string $file - The path to the file 335 | * 336 | * @return boolean True on success, otherwise False. 337 | */ 338 | protected function findJText($file) 339 | { 340 | $content = file_get_contents($file); 341 | 342 | // Search for Text/JText calls 343 | if (!preg_match_all('/\bJ?Text::(?:_|s?printf|alt|plural|script)\s*\(\s*([\'])([^\'"]+)\1\s*[\),]/', $content, $matches, PREG_OFFSET_CAPTURE)) 344 | { 345 | return true; 346 | } 347 | 348 | $lines = explode("\n", $content); 349 | 350 | // Check all keys exist in INI files 351 | foreach ($matches[2] as $match) 352 | { 353 | $key = strtoupper($match[0]); 354 | 355 | if (!isset($this->langKeys[$key])) 356 | { 357 | $lineno = substr_count($content, "\n", 0, $match[1]); 358 | $this->report->addNotice($file, Text::sprintf('COM_JEDCHECKER_LANG_UNKNOWN_KEY_IN_CODE', htmlspecialchars($key)), $lineno + 1, $lines[$lineno]); 359 | } 360 | } 361 | 362 | return true; 363 | } 364 | } 365 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmllicense.php: -------------------------------------------------------------------------------- 1 | 8 | * eaxs report->setDefaultSubtype($this->id); 68 | 69 | // Find all XML files of the extension 70 | $files = JEDCheckerHelper::findManifests($this->basedir); 71 | 72 | // Iterate through all the xml files 73 | foreach ($files as $file) 74 | { 75 | // Try to find the license 76 | $this->find($file); 77 | } 78 | } 79 | 80 | /** 81 | * Reads a file and searches for the license 82 | * 83 | * @param string $file - The path to the file 84 | * 85 | * @return boolean True if the license was found, otherwise False. 86 | */ 87 | protected function find($file) 88 | { 89 | $xml = simplexml_load_file($file); 90 | 91 | // Failed to parse the xml file. 92 | // Assume that this is not a extension manifest 93 | if (!$xml) 94 | { 95 | return true; 96 | } 97 | 98 | // Check if there's a license tag 99 | if (!isset($xml->license)) 100 | { 101 | $this->report->addError($file, Text::_('COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_FOUND')); 102 | 103 | return false; 104 | } 105 | 106 | // Check if the license is gpl 107 | if (stripos($xml->license, 'gpl') === false 108 | && stripos($xml->license, 'general public license') === false) 109 | { 110 | $this->report->addCompat($file, Text::_('COM_JEDCHECKER_ERROR_XML_LICENSE_NOT_GPL')); 111 | 112 | return false; 113 | } 114 | 115 | // All checks passed. Return true 116 | return true; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_component.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "extension": { 4 | "name": "!", 5 | "element": "?", 6 | "creationDate": "=", 7 | "author": "=", 8 | "authorEmail": "=", 9 | "authorUrl": "=", 10 | "copyright": "=", 11 | "version": "!", 12 | "description": "=", 13 | "license": "?", 14 | "changelogurl": "?", 15 | "scriptfile": "?", 16 | "install": "?", 17 | "update": "?", 18 | "uninstall": "?", 19 | "files": "?", 20 | "languages": "?", 21 | "media": "?", 22 | "administration": "?", 23 | "api": "?", 24 | "updateservers": "?", 25 | "dlid": "?", 26 | "config": "?", 27 | "namespace": "?", 28 | "dashboards": "?" 29 | }, 30 | "administration": { 31 | "menu": "?", 32 | "submenu": "?", 33 | "files": "=", 34 | "languages": "?", 35 | "media": "?" 36 | }, 37 | "api": { 38 | "files": "=" 39 | }, 40 | "files": { 41 | "filename": "*", 42 | "files:file": "*", 43 | "folder": "*" 44 | }, 45 | "languages": { 46 | "language": "*" 47 | }, 48 | "media": { 49 | "filename": "*", 50 | "media:file": "*", 51 | "folder": "*" 52 | }, 53 | "submenu": { 54 | "menu": "*" 55 | }, 56 | "install": { 57 | "sql": "*" 58 | }, 59 | "update": { 60 | "sql": "*", 61 | "schemas": "*" 62 | }, 63 | "uninstall": { 64 | "sql": "*" 65 | }, 66 | "sql": { 67 | "file": "*" 68 | }, 69 | "schemas": { 70 | "schemapath": "*" 71 | }, 72 | "updateservers": { 73 | "server": "*" 74 | }, 75 | "dashboards": { 76 | "dashboard": "*" 77 | } 78 | }, 79 | "attributes": { 80 | "extension": [ 81 | "client", 82 | "method", 83 | "overwrite", 84 | "type", 85 | "version" 86 | ], 87 | "files": [ 88 | "folder" 89 | ], 90 | "languages": [ 91 | "folder" 92 | ], 93 | "language": [ 94 | "client", 95 | "tag" 96 | ], 97 | "media": [ 98 | "destination", 99 | "folder" 100 | ], 101 | "menu": [ 102 | "act", 103 | "controller", 104 | "hidden", 105 | "img", 106 | "layout", 107 | "link", 108 | "sub", 109 | "task", 110 | "view" 111 | ], 112 | "file": [ 113 | "charset", 114 | "driver" 115 | ], 116 | "schemapath": [ 117 | "type" 118 | ], 119 | "server": [ 120 | "name", 121 | "priority", 122 | "type" 123 | ], 124 | "namespace": [ 125 | "path" 126 | ], 127 | "dlid": [ 128 | "prefix", 129 | "suffix" 130 | ], 131 | "dashboard": [ 132 | "title", 133 | "icon" 134 | ] 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "extension": { 4 | "name": "!", 5 | "creationDate": "=", 6 | "author": "=", 7 | "authorEmail": "=", 8 | "authorUrl": "=", 9 | "copyright": "=", 10 | "version": "!", 11 | "description": "=", 12 | "license": "?", 13 | "changelogurl": "?", 14 | "scriptfile": "?", 15 | "install": "?", 16 | "update": "?", 17 | "uninstall": "?", 18 | "fileset": "!", 19 | "languages": "?", 20 | "updateservers": "?", 21 | "dlid": "?" 22 | }, 23 | "fileset": { 24 | "files": "*" 25 | }, 26 | "files": { 27 | "filename": "*", 28 | "files:file": "*", 29 | "folder": "*" 30 | }, 31 | "languages": { 32 | "language": "*" 33 | }, 34 | "install": { 35 | "sql": "*" 36 | }, 37 | "update": { 38 | "sql": "*", 39 | "schemas": "*" 40 | }, 41 | "uninstall": { 42 | "sql": "*" 43 | }, 44 | "sql": { 45 | "file": "*" 46 | }, 47 | "schemas": { 48 | "schemapath": "*" 49 | }, 50 | "updateservers": { 51 | "server": "*" 52 | } 53 | }, 54 | "attributes": { 55 | "extension": [ 56 | "client", 57 | "method", 58 | "overwrite", 59 | "type", 60 | "version" 61 | ], 62 | "files": [ 63 | "folder", 64 | "target" 65 | ], 66 | "languages": [ 67 | "folder" 68 | ], 69 | "language": [ 70 | "client", 71 | "tag" 72 | ], 73 | "file": [ 74 | "charset", 75 | "driver" 76 | ], 77 | "schemapath": [ 78 | "type" 79 | ], 80 | "server": [ 81 | "name", 82 | "priority", 83 | "type" 84 | ], 85 | "dlid": [ 86 | "prefix", 87 | "suffix" 88 | ] 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_language.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "extension": { 4 | "name": "!", 5 | "tag": "!", 6 | "creationDate": "=", 7 | "author": "=", 8 | "authorEmail": "=", 9 | "authorUrl": "=", 10 | "copyright": "=", 11 | "version": "!", 12 | "description": "=", 13 | "license": "?", 14 | "changelogurl": "?", 15 | "files": "!", 16 | "media": "?", 17 | "fonts": "?", 18 | "install": "?", 19 | "update": "?", 20 | "uninstall": "?", 21 | "updateservers": "?", 22 | "dlid": "?" 23 | }, 24 | "files": { 25 | "filename": "*", 26 | "files:file": "*", 27 | "folder": "*" 28 | }, 29 | "media": { 30 | "filename": "*", 31 | "media:file": "*", 32 | "folder": "*" 33 | }, 34 | "fonts": { 35 | "filename": "*", 36 | "fonts:file": "*", 37 | "folder": "*" 38 | }, 39 | "install": { 40 | "sql": "*" 41 | }, 42 | "update": { 43 | "sql": "*", 44 | "schemas": "*" 45 | }, 46 | "uninstall": { 47 | "sql": "*" 48 | }, 49 | "sql": { 50 | "file": "*" 51 | }, 52 | "schemas": { 53 | "schemapath": "*" 54 | }, 55 | "updateservers": { 56 | "server": "*" 57 | } 58 | }, 59 | "attributes": { 60 | "extension": [ 61 | "client", 62 | "method", 63 | "overwrite", 64 | "type", 65 | "version" 66 | ], 67 | "files": [ 68 | "folder" 69 | ], 70 | "media": [ 71 | "destination", 72 | "folder" 73 | ], 74 | "fonts": [ 75 | "folder" 76 | ], 77 | "file": [ 78 | "charset", 79 | "driver" 80 | ], 81 | "schemapath": [ 82 | "type" 83 | ], 84 | "server": [ 85 | "name", 86 | "priority", 87 | "type" 88 | ], 89 | "dlid": [ 90 | "prefix", 91 | "suffix" 92 | ] 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_library.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "extension": { 4 | "name": "!", 5 | "libraryname": "!", 6 | "creationDate": "=", 7 | "author": "=", 8 | "authorEmail": "=", 9 | "authorUrl": "=", 10 | "copyright": "=", 11 | "version": "!", 12 | "description": "=", 13 | "license": "?", 14 | "changelogurl": "?", 15 | "packager": "?", 16 | "packagerurl": "?", 17 | "scriptfile": "?", 18 | "install": "?", 19 | "update": "?", 20 | "uninstall": "?", 21 | "files": "?", 22 | "languages": "?", 23 | "media": "?", 24 | "updateservers": "?", 25 | "dlid": "?" 26 | }, 27 | "files": { 28 | "filename": "*", 29 | "files:file": "*", 30 | "folder": "*" 31 | }, 32 | "languages": { 33 | "language": "*" 34 | }, 35 | "media": { 36 | "filename": "*", 37 | "media:file": "*", 38 | "folder": "*" 39 | }, 40 | "install": { 41 | "sql": "*" 42 | }, 43 | "update": { 44 | "sql": "*", 45 | "schemas": "*" 46 | }, 47 | "uninstall": { 48 | "sql": "*" 49 | }, 50 | "sql": { 51 | "file": "*" 52 | }, 53 | "schemas": { 54 | "schemapath": "*" 55 | }, 56 | "updateservers": { 57 | "server": "*" 58 | } 59 | }, 60 | "attributes": { 61 | "extension": [ 62 | "client", 63 | "method", 64 | "overwrite", 65 | "type", 66 | "version" 67 | ], 68 | "files": [ 69 | "folder" 70 | ], 71 | "languages": [ 72 | "folder" 73 | ], 74 | "language": [ 75 | "client", 76 | "tag" 77 | ], 78 | "media": [ 79 | "destination", 80 | "folder" 81 | ], 82 | "file": [ 83 | "charset", 84 | "driver" 85 | ], 86 | "schemapath": [ 87 | "type" 88 | ], 89 | "server": [ 90 | "name", 91 | "priority", 92 | "type" 93 | ], 94 | "dlid": [ 95 | "prefix", 96 | "suffix" 97 | ] 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_module.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "extension": { 4 | "name": "!", 5 | "element": "?", 6 | "creationDate": "=", 7 | "author": "=", 8 | "authorEmail": "=", 9 | "authorUrl": "=", 10 | "copyright": "=", 11 | "version": "!", 12 | "description": "=", 13 | "license": "?", 14 | "changelogurl": "?", 15 | "scriptfile": "?", 16 | "install": "?", 17 | "update": "?", 18 | "uninstall": "?", 19 | "files": "?", 20 | "languages": "?", 21 | "media": "?", 22 | "updateservers": "?", 23 | "dlid": "?", 24 | "help": "?", 25 | "config": "?", 26 | "namespace": "?" 27 | }, 28 | "files": { 29 | "filename": "*", 30 | "files:file": "*", 31 | "folder": "*" 32 | }, 33 | "languages": { 34 | "language": "*" 35 | }, 36 | "media": { 37 | "filename": "*", 38 | "media:file": "*", 39 | "folder": "*" 40 | }, 41 | "install": { 42 | "sql": "*" 43 | }, 44 | "update": { 45 | "sql": "*", 46 | "schemas": "*" 47 | }, 48 | "uninstall": { 49 | "sql": "*" 50 | }, 51 | "sql": { 52 | "file": "*" 53 | }, 54 | "schemas": { 55 | "schemapath": "*" 56 | }, 57 | "updateservers": { 58 | "server": "*" 59 | }, 60 | "config": { 61 | "fields": "!" 62 | }, 63 | "fields": { 64 | "fieldset": "+" 65 | }, 66 | "fieldset": { 67 | "field": "+" 68 | }, 69 | "field": { 70 | "*": "*" 71 | } 72 | }, 73 | "attributes": { 74 | "extension": [ 75 | "client", 76 | "method", 77 | "overwrite", 78 | "type", 79 | "version" 80 | ], 81 | "files": [ 82 | "folder" 83 | ], 84 | "filename": [ 85 | "module" 86 | ], 87 | "files:file": [ 88 | "module" 89 | ], 90 | "folder": [ 91 | "module" 92 | ], 93 | "languages": [ 94 | "folder" 95 | ], 96 | "language": [ 97 | "client", 98 | "tag" 99 | ], 100 | "media": [ 101 | "destination", 102 | "folder" 103 | ], 104 | "file": [ 105 | "charset", 106 | "driver" 107 | ], 108 | "schemapath": [ 109 | "type" 110 | ], 111 | "server": [ 112 | "name", 113 | "priority", 114 | "type" 115 | ], 116 | "namespace": [ 117 | "path" 118 | ], 119 | "config": [ 120 | "addfieldpath", 121 | "addfieldprefix", 122 | "addformpath", 123 | "addformprefix", 124 | "addrulepath", 125 | "addruleprefix" 126 | ], 127 | "fields": [ 128 | "addfieldpath", 129 | "addfieldprefix", 130 | "addformpath", 131 | "addformprefix", 132 | "addrulepath", 133 | "addruleprefix", 134 | "name" 135 | ], 136 | "fieldset": [ 137 | "addfieldpath", 138 | "addfieldprefix", 139 | "addformpath", 140 | "addformprefix", 141 | "addrulepath", 142 | "addruleprefix", 143 | "description", 144 | "label", 145 | "name" 146 | ], 147 | "field": [ 148 | "*" 149 | ], 150 | "help": [ 151 | "key", 152 | "url" 153 | ], 154 | "dlid": [ 155 | "prefix", 156 | "suffix" 157 | ] 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_package.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "extension": { 4 | "name": "!", 5 | "packagename": "!", 6 | "creationDate": "=", 7 | "author": "=", 8 | "authorEmail": "=", 9 | "authorUrl": "=", 10 | "copyright": "=", 11 | "version": "!", 12 | "description": "=", 13 | "license": "?", 14 | "changelogurl": "?", 15 | "scriptfile": "?", 16 | "install": "?", 17 | "update": "?", 18 | "uninstall": "?", 19 | "files": "?", 20 | "languages": "?", 21 | "updateservers": "?", 22 | "dlid": "?", 23 | "url": "?", 24 | "packager": "?", 25 | "packagerurl": "?", 26 | "blockChildUninstall": "?" 27 | }, 28 | "files": { 29 | "filename": "*", 30 | "files:file": "*", 31 | "folder": "*" 32 | }, 33 | "languages": { 34 | "language": "*" 35 | }, 36 | "install": { 37 | "sql": "*" 38 | }, 39 | "update": { 40 | "sql": "*", 41 | "schemas": "*" 42 | }, 43 | "uninstall": { 44 | "sql": "*" 45 | }, 46 | "sql": { 47 | "file": "*" 48 | }, 49 | "schemas": { 50 | "schemapath": "*" 51 | }, 52 | "updateservers": { 53 | "server": "*" 54 | } 55 | }, 56 | "attributes": { 57 | "extension": [ 58 | "method", 59 | "overwrite", 60 | "type", 61 | "version" 62 | ], 63 | "files": [ 64 | "folder" 65 | ], 66 | "files:file": [ 67 | "client", 68 | "group", 69 | "id", 70 | "type" 71 | ], 72 | "filename": [ 73 | "client", 74 | "group", 75 | "id", 76 | "type" 77 | ], 78 | "folder": [ 79 | "client", 80 | "group", 81 | "id", 82 | "type" 83 | ], 84 | "languages": [ 85 | "folder" 86 | ], 87 | "language": [ 88 | "client", 89 | "tag" 90 | ], 91 | "file": [ 92 | "charset", 93 | "driver" 94 | ], 95 | "schemapath": [ 96 | "type" 97 | ], 98 | "server": [ 99 | "name", 100 | "priority", 101 | "type" 102 | ], 103 | "dlid": [ 104 | "prefix", 105 | "suffix" 106 | ] 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "extension": { 4 | "name": "!", 5 | "element": "?", 6 | "creationDate": "=", 7 | "author": "=", 8 | "authorEmail": "=", 9 | "authorUrl": "=", 10 | "copyright": "=", 11 | "version": "!", 12 | "description": "=", 13 | "license": "?", 14 | "changelogurl": "?", 15 | "scriptfile": "?", 16 | "install": "?", 17 | "update": "?", 18 | "uninstall": "?", 19 | "files": "?", 20 | "languages": "?", 21 | "media": "?", 22 | "updateservers": "?", 23 | "dlid": "?", 24 | "help": "?", 25 | "config": "?", 26 | "namespace": "?" 27 | }, 28 | "files": { 29 | "filename": "*", 30 | "files:file": "*", 31 | "folder": "*" 32 | }, 33 | "languages": { 34 | "language": "*" 35 | }, 36 | "media": { 37 | "filename": "*", 38 | "media:file": "*", 39 | "folder": "*" 40 | }, 41 | "install": { 42 | "sql": "*" 43 | }, 44 | "update": { 45 | "sql": "*", 46 | "schemas": "*" 47 | }, 48 | "uninstall": { 49 | "sql": "*" 50 | }, 51 | "sql": { 52 | "file": "*" 53 | }, 54 | "schemas": { 55 | "schemapath": "*" 56 | }, 57 | "updateservers": { 58 | "server": "*" 59 | }, 60 | "config": { 61 | "fields": "!" 62 | }, 63 | "fields": { 64 | "fieldset": "+" 65 | }, 66 | "fieldset": { 67 | "field": "+" 68 | }, 69 | "field": { 70 | "*": "*" 71 | } 72 | }, 73 | "attributes": { 74 | "extension": [ 75 | "client", 76 | "group", 77 | "method", 78 | "overwrite", 79 | "type", 80 | "version" 81 | ], 82 | "files": [ 83 | "folder" 84 | ], 85 | "filename": [ 86 | "plugin" 87 | ], 88 | "files:file": [ 89 | "plugin" 90 | ], 91 | "folder": [ 92 | "plugin" 93 | ], 94 | "languages": [ 95 | "folder" 96 | ], 97 | "language": [ 98 | "client", 99 | "tag" 100 | ], 101 | "media": [ 102 | "destination", 103 | "folder" 104 | ], 105 | "file": [ 106 | "charset", 107 | "driver" 108 | ], 109 | "schemapath": [ 110 | "type" 111 | ], 112 | "server": [ 113 | "name", 114 | "priority", 115 | "type" 116 | ], 117 | "namespace": [ 118 | "path" 119 | ], 120 | "config": [ 121 | "addfieldpath", 122 | "addfieldprefix", 123 | "addformpath", 124 | "addformprefix", 125 | "addrulepath", 126 | "addruleprefix" 127 | ], 128 | "fields": [ 129 | "addfieldpath", 130 | "addfieldprefix", 131 | "addformpath", 132 | "addformprefix", 133 | "addrulepath", 134 | "addruleprefix", 135 | "name" 136 | ], 137 | "fieldset": [ 138 | "addfieldpath", 139 | "addfieldprefix", 140 | "addformpath", 141 | "addformprefix", 142 | "addrulepath", 143 | "addruleprefix", 144 | "description", 145 | "label", 146 | "name" 147 | ], 148 | "field": [ 149 | "*" 150 | ], 151 | "help": [ 152 | "key", 153 | "url" 154 | ], 155 | "dlid": [ 156 | "prefix", 157 | "suffix" 158 | ] 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_template.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "extension": { 4 | "name": "!", 5 | "element": "?", 6 | "creationDate": "=", 7 | "author": "=", 8 | "authorEmail": "=", 9 | "authorUrl": "=", 10 | "copyright": "=", 11 | "version": "!", 12 | "description": "=", 13 | "license": "?", 14 | "changelogurl": "?", 15 | "scriptfile": "?", 16 | "files": "?", 17 | "images": "?", 18 | "css": "?", 19 | "languages": "?", 20 | "media": "?", 21 | "positions": "=", 22 | "updateservers": "?", 23 | "dlid": "?", 24 | "help": "?", 25 | "config": "?", 26 | "parent": "?", 27 | "inheritable": "?" 28 | }, 29 | "positions": { 30 | "position": "*" 31 | }, 32 | "files": { 33 | "filename": "*", 34 | "files:file": "*", 35 | "folder": "*" 36 | }, 37 | "images": { 38 | "filename": "*", 39 | "images:file": "*", 40 | "folder": "*" 41 | }, 42 | "css": { 43 | "filename": "*", 44 | "css:file": "*", 45 | "folder": "*" 46 | }, 47 | "languages": { 48 | "language": "*" 49 | }, 50 | "media": { 51 | "filename": "*", 52 | "media:file": "*", 53 | "folder": "*" 54 | }, 55 | "updateservers": { 56 | "server": "*" 57 | }, 58 | "config": { 59 | "fields": "!" 60 | }, 61 | "fields": { 62 | "fieldset": "+" 63 | }, 64 | "fieldset": { 65 | "field": "+" 66 | }, 67 | "field": { 68 | "*": "*" 69 | } 70 | }, 71 | "attributes": { 72 | "extension": [ 73 | "client", 74 | "method", 75 | "overwrite", 76 | "type", 77 | "version" 78 | ], 79 | "files": [ 80 | "folder" 81 | ], 82 | "images": [ 83 | "folder" 84 | ], 85 | "css": [ 86 | "folder" 87 | ], 88 | "languages": [ 89 | "folder" 90 | ], 91 | "language": [ 92 | "client", 93 | "tag" 94 | ], 95 | "position": [ 96 | "value" 97 | ], 98 | "media": [ 99 | "destination", 100 | "folder" 101 | ], 102 | "file": [ 103 | "charset", 104 | "driver" 105 | ], 106 | "server": [ 107 | "name", 108 | "priority", 109 | "type" 110 | ], 111 | "config": [ 112 | "addfieldpath", 113 | "addfieldprefix", 114 | "addformpath", 115 | "addformprefix", 116 | "addrulepath", 117 | "addruleprefix" 118 | ], 119 | "fields": [ 120 | "addfieldpath", 121 | "addfieldprefix", 122 | "addformpath", 123 | "addformprefix", 124 | "addrulepath", 125 | "addruleprefix", 126 | "name" 127 | ], 128 | "fieldset": [ 129 | "addfieldpath", 130 | "addfieldprefix", 131 | "addformpath", 132 | "addformprefix", 133 | "addrulepath", 134 | "addruleprefix", 135 | "description", 136 | "label", 137 | "name" 138 | ], 139 | "field": [ 140 | "*" 141 | ], 142 | "help": [ 143 | "key", 144 | "url" 145 | ], 146 | "dlid": [ 147 | "prefix", 148 | "suffix" 149 | ] 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/libraries/rules/xmlupdateserver.php: -------------------------------------------------------------------------------- 1 | 8 | * eaxs 9 | * 10 | * @license GNU General Public License version 2 or later; see LICENSE.txt 11 | */ 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | use Joomla\CMS\Language\Text; 16 | 17 | // Include the rule base class 18 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/rule.php'; 19 | 20 | // Include the helper class 21 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/libraries/helper.php'; 22 | 23 | /** 24 | * class JedcheckerRulesXMLUpdateServer 25 | * 26 | * This class searches all xml files for valid Update Servers 27 | * 28 | * @since 1.0 29 | */ 30 | class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule 31 | { 32 | /** 33 | * The formal ID of this rule. For example: SE1. 34 | * 35 | * @var string 36 | */ 37 | protected $id = 'US1'; 38 | 39 | /** 40 | * The title or caption of this rule. 41 | * 42 | * @var string 43 | */ 44 | protected $title = 'COM_JEDCHECKER_RULE_US1'; 45 | 46 | /** 47 | * The description of this rule. 48 | * 49 | * @var string 50 | */ 51 | protected $description = 'COM_JEDCHECKER_RULE_US1_DESC'; 52 | 53 | /** 54 | * The ordering value to sort rules in the menu. 55 | * 56 | * @var integer 57 | */ 58 | public static $ordering = 400; 59 | 60 | /** 61 | * Initiates the search and check 62 | * 63 | * @return void 64 | */ 65 | public function check() 66 | { 67 | $this->report->setDefaultSubtype($this->id); 68 | 69 | // Find all XML files of the extension 70 | $files = JEDCheckerHelper::findManifests($this->basedir); 71 | 72 | // Find XML package file 73 | $packageFile = $this->checkPackageXML($files); 74 | 75 | if (!$packageFile) 76 | { 77 | $XMLFiles = $this->findXMLPaths($files); 78 | } 79 | 80 | return true; 81 | } 82 | 83 | /** 84 | * Reads a file and searches for package xml file 85 | * 86 | * @param string $files - The path to the file 87 | * 88 | * @return boolean True if the package xml file was found, otherwise False. 89 | */ 90 | protected function checkPackageXML($files) 91 | { 92 | $packageCount = 0; 93 | 94 | foreach ($files as $file) 95 | { 96 | $xml = simplexml_load_file($file); 97 | 98 | // Check if extension attribute 'type' is for a package 99 | if ($xml && (string) $xml['type'] === 'package') 100 | { 101 | $packageCount++; 102 | $this->find($file); 103 | } 104 | } 105 | 106 | // No XML file found for package 107 | if ($packageCount == 0) 108 | { 109 | return false; 110 | } else { 111 | return true; 112 | } 113 | } 114 | 115 | /** 116 | * Reads a file and searches for paths of xml files 117 | * 118 | * @param string $files - The path to the file 119 | * 120 | * @return void 121 | */ 122 | protected function findXMLPaths($files) 123 | { 124 | $XMLFiles = array(); 125 | $componentPaths = array(); 126 | 127 | foreach ($files as $file) 128 | { 129 | $xml = simplexml_load_file($file); 130 | 131 | if ($xml) 132 | { 133 | $directories = explode('/', substr($file, 0, strrpos( $file, '/'))); 134 | $XMLFiles[] = array( 135 | 'type' => (string) $xml->attributes()->type, 136 | 'filepath' => $file, 137 | 'directoryPath' => substr($file, 0, strrpos( $file, '/')), 138 | 'directory' => trim(end($directories)) 139 | ); 140 | 141 | if ($xml->attributes()->type == 'component') 142 | { 143 | $componentPaths[] = substr($file, 0, strrpos( $file, '/')); 144 | } 145 | } 146 | } 147 | 148 | foreach ($XMLFiles as $XMLFile) 149 | { 150 | // Always check component XML files for update servers 151 | if ($XMLFile['type'] == 'component') 152 | { 153 | $this->find($XMLFile['filepath']); 154 | 155 | } else { 156 | // If not component, check if XML is nested inside component folder. 157 | $nested = false; 158 | 159 | foreach ($componentPaths as $component) 160 | { 161 | if (strpos($XMLFile['directoryPath'], $component) !== false) 162 | { 163 | $nested = true; 164 | } 165 | } 166 | 167 | if (!$nested){ 168 | $this->find($XMLFile['filepath']); 169 | } 170 | } 171 | } 172 | 173 | return true; 174 | } 175 | 176 | 177 | /** 178 | * Reads a file and searches for the update server 179 | * 180 | * @param string $file - The path to the file 181 | * 182 | * @return boolean True if the update server was found, otherwise False. 183 | */ 184 | protected function find($file) 185 | { 186 | $xml = simplexml_load_file($file); 187 | 188 | // Failed to parse the xml file. 189 | // Assume that this is not a extension manifest 190 | if (!$xml) 191 | { 192 | return true; 193 | } 194 | 195 | // Check if there is an updateservers tag 196 | if (!isset($xml->updateservers)) 197 | { 198 | $this->report->addError($file, Text::_('COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND')); 199 | 200 | return false; 201 | } 202 | 203 | // Check if server tag(s) exist 204 | if (!isset($xml->updateservers->server)) 205 | { 206 | $this->report->addError($file, Text::_('COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND')); 207 | 208 | return false; 209 | 210 | } 211 | 212 | // Check if server tag(s) contain valid links 213 | foreach ($xml->updateservers->server as $server) 214 | { 215 | if (stripos($server, 'http') === false) 216 | { 217 | $this->report->addError($file, Text::_('COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_LINK_NOT_FOUND')); 218 | 219 | return false; 220 | } 221 | else 222 | { 223 | $this->report->addPassed($file, Text::sprintf('COM_JEDCHECKER_INFO_XML_UPDATE_SERVER_LINK', (string) $server)); 224 | } 225 | } 226 | 227 | // All checks passed. Return true 228 | return true; 229 | } 230 | } 231 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/models/item.php: -------------------------------------------------------------------------------- 1 | type = $type; 53 | $this->subtype = $subtype; 54 | $this->text = $text; 55 | $this->location = $location; 56 | $this->line = $line; 57 | $this->code = $code; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/models/rule.php: -------------------------------------------------------------------------------- 1 | 8 | * eaxs 9 | * 10 | * @license GNU General Public License version 2 or later; see LICENSE.txt 11 | */ 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | use Joomla\Registry\Registry; 16 | use Joomla\CMS\Object\CMSObject; 17 | 18 | /** 19 | * class JEDcheckerRule 20 | * 21 | * Serves as a base class for all JED rules. 22 | * 23 | * @since 1.0 24 | */ 25 | class JEDcheckerRule extends CMSObject 26 | { 27 | /** 28 | * The formal ID of this rule. For example: SE1. 29 | * 30 | * @var string 31 | */ 32 | protected $id; 33 | 34 | /** 35 | * The title or caption of this rule. 36 | * 37 | * @var string 38 | */ 39 | protected $title; 40 | 41 | /** 42 | * The description of this rule. 43 | * 44 | * @var string 45 | */ 46 | protected $description; 47 | 48 | /** 49 | * The ordering value to sort rules in the menu. 50 | * 51 | * @var integer 52 | */ 53 | public static $ordering = 10000; 54 | 55 | /** 56 | * The absolute path to the target extension. 57 | * 58 | * @var string 59 | */ 60 | protected $basedir; 61 | 62 | /** 63 | * Optional rule parameters. 64 | * 65 | * @var object 66 | */ 67 | protected $params; 68 | 69 | /** 70 | * The report summary 71 | * 72 | * @var array 73 | */ 74 | protected $report; 75 | 76 | /** 77 | * Constructor. Initialises variables. 78 | * 79 | * @param mixed $properties - See JObject::__construct 80 | */ 81 | public function __construct($properties = null) 82 | { 83 | // Construct JObject 84 | parent::__construct($properties); 85 | 86 | // Initialise vars 87 | if (empty($this->report)) 88 | { 89 | // Create a new report 90 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/item.php'; 91 | require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/report.php'; 92 | $this->report = new JEDcheckerReport($properties); 93 | } 94 | 95 | // Try to load the params 96 | if (empty($this->params)) 97 | { 98 | $this->params = $this->loadParams(); 99 | } 100 | } 101 | 102 | /** 103 | * Performs the rule check. This method should be overloaded! 104 | * 105 | * @return void 106 | */ 107 | public function check() 108 | { 109 | // Overload this method 110 | } 111 | 112 | /** 113 | * Attempts to load a .ini param file of this rule. 114 | * 115 | * @return Joomla\Registry\Registry 116 | */ 117 | protected function loadParams() 118 | { 119 | // Try to determine the name and location of the params file 120 | $file_name = str_replace('jedcheckerrules', '', strtolower(get_class($this))); 121 | $params_file = JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/' . $file_name . '.ini'; 122 | 123 | $params = new Registry('jedchecker.rule.' . $file_name); 124 | //$params = $registry->getInstance('jedchecker.rule.' . $file_name); 125 | 126 | //$params = Joomla\Registry\Registry::getInstance('jedchecker.rule.' . $file_name); 127 | 128 | // Load the params from the ini file 129 | if (file_exists($params_file)) 130 | { 131 | // Due to a bug in Joomla 2.5.6, this method cannot be used 132 | // $params->loadFile($params_file, 'INI'); 133 | 134 | // Get the contents of the file 135 | $data = file_get_contents($params_file); 136 | 137 | if ($data) 138 | { 139 | $obj = (object) parse_ini_string($data); 140 | 141 | if (is_object($obj)) 142 | { 143 | $params->loadObject($obj); 144 | } 145 | } 146 | } 147 | 148 | return $params; 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/views/uploads/tmpl/default.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @license GNU General Public License version 2 or later; see LICENSE.txt 10 | */ 11 | 12 | defined('_JEXEC') or die('Restricted access'); 13 | 14 | use Joomla\CMS\HTML\HTMLHelper; 15 | use Joomla\CMS\Language\Text; 16 | use Joomla\CMS\Router\Route; 17 | 18 | // Load Bootstrap 19 | if (version_compare(JVERSION, '4.0', '>=')) 20 | { 21 | HTMLHelper::_('bootstrap.collapse'); 22 | HTMLHelper::_('bootstrap.tab'); 23 | 24 | // Tooltips are used by JAMSS reports 25 | HTMLHelper::_('bootstrap.tooltip'); 26 | } 27 | else 28 | { 29 | HTMLHelper::_('behavior.core'); 30 | HTMLHelper::_('stylesheet', 'com_jedchecker/j4-style.css', array('version' => 'auto', 'relative' => true)); 31 | HTMLHelper::_('script', 'com_jedchecker/bootstrap.bundle.min.js', array('version' => 'auto', 'relative' => true), array('defer' => true)); 32 | } 33 | 34 | HTMLHelper::_('stylesheet', 'com_jedchecker/style.css', array('version' => 'auto', 'relative' => true)); 35 | HTMLHelper::_('script', 'com_jedchecker/script.js', array('version' => 'auto', 'relative' => true), array('defer' => true)); 36 | ?> 37 | 38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 |
46 |

47 | 48 |

49 |

50 | 51 |

52 |

53 | 54 |

55 |
    56 |
  1. 57 |
  2. 58 |
59 |
61 |
62 | 65 | 68 |
69 |
70 | 71 | 72 | 73 |
74 |
75 |
76 |
77 | 78 |
79 |
80 |
81 | 82 |
83 |
84 |
85 |

86 | 87 | 88 |

89 |
90 |
91 |
92 | 93 | 128 | 129 | 157 |
158 |
159 | -------------------------------------------------------------------------------- /administrator/components/com_jedchecker/views/uploads/view.html.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @license GNU General Public License version 2 or later; see LICENSE.txt 10 | */ 11 | 12 | defined('_JEXEC') or die('Restricted access'); 13 | 14 | use Joomla\CMS\Factory; 15 | use Joomla\CMS\Filesystem\File; 16 | use Joomla\CMS\Filesystem\Folder; 17 | use Joomla\CMS\Language\Text; 18 | use Joomla\CMS\MVC\View\HtmlView; 19 | use Joomla\CMS\Toolbar\ToolbarHelper; 20 | use Joomla\CMS\Uri\Uri; 21 | 22 | /** 23 | * Class JedcheckerViewUploads 24 | * 25 | * @since 1.0 26 | */ 27 | class JedcheckerViewUploads extends HtmlView 28 | { 29 | /** @var string */ 30 | protected $path; 31 | 32 | /** @var array */ 33 | protected $jsOptions; 34 | 35 | /** 36 | * Display method 37 | * 38 | * @param string $tpl - the template 39 | * 40 | * @return mixed|void 41 | */ 42 | public function display($tpl = null) 43 | { 44 | $this->path = Factory::getConfig()->get('tmp_path') . '/jed_checker'; 45 | 46 | // Load translation for "JED Checker" title from sys.ini file 47 | Factory::getLanguage()->load('com_jedchecker.sys', JPATH_ADMINISTRATOR); 48 | 49 | $this->setToolbar(); 50 | $this->jsOptions['url'] = Uri::base(); 51 | $this->jsOptions['rules'] = $this->getRules(); 52 | parent::display($tpl); 53 | } 54 | 55 | /** 56 | * Get the component rules 57 | * 58 | * @return array 59 | */ 60 | public function getRules() 61 | { 62 | $rules = array(); 63 | $files = Folder::files(JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules', '\.php$', false, false); 64 | 65 | JLoader::discover('jedcheckerRules', JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/'); 66 | 67 | foreach ($files as $file) 68 | { 69 | $rule = substr($file, 0, -4); 70 | $class = 'jedcheckerRules' . ucfirst($rule); 71 | 72 | if (class_exists($class) && is_subclass_of($class, 'JEDcheckerRule')) 73 | { 74 | $rules[$rule] = $class::$ordering; 75 | } 76 | } 77 | 78 | asort($rules, SORT_NUMERIC); 79 | $rules = array_keys($rules); 80 | 81 | return $rules; 82 | } 83 | 84 | /** 85 | * Creates the toolbar options 86 | * 87 | * @return void 88 | */ 89 | public function setToolbar() 90 | { 91 | if ($this->filesExist('unzipped')) 92 | { 93 | ToolbarHelper::custom('check', 'search', 'search', Text::_('COM_JEDCHECKER_TOOLBAR_CHECK'), false); 94 | } 95 | 96 | ToolbarHelper::title(Text::_('COM_JEDCHECKER')); 97 | 98 | if (file_exists($this->path)) 99 | { 100 | ToolbarHelper::custom('uploads.clear', 'delete', 'delete', Text::_('COM_JEDCHECKER_TOOLBAR_CLEAR'), false); 101 | } 102 | 103 | if (Factory::getUser()->authorise('core.admin', 'com_jedchecker')) 104 | { 105 | ToolbarHelper::preferences('com_jedchecker'); 106 | } 107 | } 108 | 109 | /** 110 | * Checks if folder + files exist in the jed_checker tmp path 111 | * 112 | * @param string $type - action 113 | * 114 | * @return boolean 115 | */ 116 | private function filesExist($type) 117 | { 118 | $path = Factory::getConfig()->get('tmp_path') . '/jed_checker/' . $type; 119 | 120 | if (Folder::exists($path)) 121 | { 122 | if (Folder::folders($path) || Folder::files($path)) 123 | { 124 | return true; 125 | } 126 | } 127 | else 128 | { 129 | $local = Factory::getConfig()->get('tmp_path') . '/jed_checker/local.txt'; 130 | 131 | if ($type === 'unzipped' && File::exists($local)) 132 | { 133 | return true; 134 | } 135 | } 136 | 137 | return false; 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "joomla-extensions/jedchecker", 3 | "description": "Joomla extension to check components, modules or plugins for possible problems for submission to the JED", 4 | "license" : "GPL-2.0-or-later", 5 | "config": { 6 | "platform": { 7 | "php": "7.2.23" 8 | } 9 | }, 10 | "require" : { 11 | "php": ">=7.2.0" 12 | }, 13 | "require-dev": { 14 | "joomla/cms-coding-standards": "~2.0.0-alpha2@dev", 15 | "joomla/coding-standards": "~3.0@dev", 16 | "friendsofphp/php-cs-fixer": "~2.12", 17 | "squizlabs/php_codesniffer": "~3.0", 18 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
8 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /crowdin-develop.yml: -------------------------------------------------------------------------------- 1 | # Project Public Identifier: joomla-official-extensions 2 | project_id: 104 3 | api_token_env: CROWDIN_PERSONAL_TOKEN 4 | base_path: 5 | base_url: "https://joomla.crowdin.com" 6 | 7 | preserve_hierarchy: true 8 | 9 | files: 10 | - source: /administrator/components/com_jedchecker/language/en-GB/en-GB.com_jedchecker.ini 11 | dest: 'JEDChecker/administrator/en-GB.com_jedchecker.ini' 12 | translation: /administrator/components/com_jedchecker/language/%locale%/%locale%.com_jedchecker.ini 13 | update_option: update_as_unapproved 14 | - source: /administrator/components/com_jedchecker/language/en-GB/en-GB.com_jedchecker.sys.ini 15 | dest: 'JEDChecker/administrator/en-GB.com_jedchecker.sys.ini' 16 | translation: /administrator/components/com_jedchecker/language/%locale%/%locale%.com_jedchecker.sys.ini 17 | update_option: update_as_unapproved 18 | -------------------------------------------------------------------------------- /jedchecker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | COM_JEDCHECKER 4 | Joomla! Extensions Directory 5 | 2023-09-21 6 | Copyright (C) 2017 - 2023 Open Source Matters, Inc. All rights reserved. 7 | extensions@extensions.joomla.org 8 | https://github.com/joomla-extensions/jedchecker 9 | 2.4.4 10 | http://www.gnu.org/copyleft/gpl.html GNU/GPL 11 | 12 | 13 | script.php 14 | 15 | COM_JEDCHECKER 16 | 17 | access.xml 18 | config.xml 19 | controller.php 20 | controllers 21 | jedchecker.php 22 | language 23 | libraries 24 | models 25 | views 26 | 27 | 28 | 29 | af-ZA/af-ZA.com_jedchecker.ini 30 | af-ZA/af-ZA.com_jedchecker.sys.ini 31 | ar-SA/ar-SA.com_jedchecker.ini 32 | ar-SA/ar-SA.com_jedchecker.sys.ini 33 | ca-ES/ca-ES.com_jedchecker.ini 34 | ca-ES/ca-ES.com_jedchecker.sys.ini 35 | cs-CZ/cs-CZ.com_jedchecker.ini 36 | cs-CZ/cs-CZ.com_jedchecker.sys.ini 37 | da-DK/da-DK.com_jedchecker.ini 38 | da-DK/da-DK.com_jedchecker.sys.ini 39 | de-DE/de-DE.com_jedchecker.ini 40 | de-DE/de-DE.com_jedchecker.sys.ini 41 | el-GR/el-GR.com_jedchecker.ini 42 | el-GR/el-GR.com_jedchecker.sys.ini 43 | en-GB/en-GB.com_jedchecker.ini 44 | en-GB/en-GB.com_jedchecker.sys.ini 45 | en-US/en-US.com_jedchecker.ini 46 | en-US/en-US.com_jedchecker.sys.ini 47 | es-ES/es-ES.com_jedchecker.ini 48 | es-ES/es-ES.com_jedchecker.sys.ini 49 | fi-FI/fi-FI.com_jedchecker.ini 50 | fi-FI/fi-FI.com_jedchecker.sys.ini 51 | fr-FR/fr-FR.com_jedchecker.ini 52 | fr-FR/fr-FR.com_jedchecker.sys.ini 53 | he-IL/he-IL.com_jedchecker.ini 54 | he-IL/he-IL.com_jedchecker.sys.ini 55 | hu-HU/hu-HU.com_jedchecker.ini 56 | hu-HU/hu-HU.com_jedchecker.sys.ini 57 | it-IT/it-IT.com_jedchecker.ini 58 | it-IT/it-IT.com_jedchecker.sys.ini 59 | ja-JP/ja-JP.com_jedchecker.ini 60 | ja-JP/ja-JP.com_jedchecker.sys.ini 61 | ko-KR/ko-KR.com_jedchecker.ini 62 | ko-KR/ko-KR.com_jedchecker.sys.ini 63 | nl-BE/nl-BE.com_jedchecker.ini 64 | nl-BE/nl-BE.com_jedchecker.sys.ini 65 | nl-NL/nl-NL.com_jedchecker.ini 66 | nl-NL/nl-NL.com_jedchecker.sys.ini 67 | no-NO/no-NO.com_jedchecker.ini 68 | no-NO/no-NO.com_jedchecker.sys.ini 69 | pl-PL/pl-PL.com_jedchecker.ini 70 | pl-PL/pl-PL.com_jedchecker.sys.ini 71 | pt-BR/pt-BR.com_jedchecker.ini 72 | pt-BR/pt-BR.com_jedchecker.sys.ini 73 | pt-PT/pt-PT.com_jedchecker.ini 74 | pt-PT/pt-PT.com_jedchecker.sys.ini 75 | ro-RO/ro-RO.com_jedchecker.ini 76 | ro-RO/ro-RO.com_jedchecker.sys.ini 77 | ru-RU/ru-RU.com_jedchecker.ini 78 | ru-RU/ru-RU.com_jedchecker.sys.ini 79 | sv-SE/sv-SE.com_jedchecker.ini 80 | sv-SE/sv-SE.com_jedchecker.sys.ini 81 | tr-TR/tr-TR.com_jedchecker.ini 82 | tr-TR/tr-TR.com_jedchecker.sys.ini 83 | uk-UA/uk-UA.com_jedchecker.ini 84 | uk-UA/uk-UA.com_jedchecker.sys.ini 85 | vi-VN/vi-VN.com_jedchecker.ini 86 | vi-VN/vi-VN.com_jedchecker.sys.ini 87 | zh-CN/zh-CN.com_jedchecker.ini 88 | zh-CN/zh-CN.com_jedchecker.sys.ini 89 | zh-TW/zh-TW.com_jedchecker.ini 90 | zh-TW/zh-TW.com_jedchecker.sys.ini 91 | 92 | 93 | 94 | css 95 | js 96 | 97 | 98 | 99 | https://raw.githubusercontent.com/joomla-extensions/jedchecker/master/manifest.xml 100 | 101 | 102 | -------------------------------------------------------------------------------- /manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JED Checker Extension 5 | 6 | com_jedchecker 7 | component 8 | 2.4.4 9 | administrator 10 | https://github.com/joomla-extensions/jedchecker/releases/tag/2.4.4 11 | 12 | https://github.com/joomla-extensions/jedchecker/archive/refs/tags/2.4.4.zip 13 | 14 | 15 | stable 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /media/com_jedchecker/css/style.css: -------------------------------------------------------------------------------- 1 | /* BS5 spinner */ 2 | @-webkit-keyframes spinner-border { 3 | to { 4 | transform: rotate(360deg); 5 | } 6 | } 7 | 8 | @keyframes spinner-border { 9 | to { 10 | transform: rotate(360deg); 11 | } 12 | } 13 | #jedchecker .spinner-border { 14 | display: inline-block; 15 | width: 2rem; 16 | height: 2rem; 17 | vertical-align: text-bottom; 18 | border: 0.25em solid currentColor; 19 | border-right-color: transparent; 20 | border-radius: 50%; 21 | -webkit-animation: 0.75s linear infinite spinner-border; 22 | animation: 0.75s linear infinite spinner-border; 23 | } 24 | 25 | #jedchecker .spinner-border-sm { 26 | width: 1rem; 27 | height: 1rem; 28 | border-width: 0.2em; 29 | } 30 | 31 | #jedchecker .spinner-border.hidden { 32 | display: none; 33 | } 34 | 35 | /* Style overrides */ 36 | #jedchecker .list-group-item-action.list-group-item-action.active { 37 | color: #fff; 38 | background-color: #132f53 !important; 39 | border-color: #132f53 !important; 40 | } 41 | 42 | #jedchecker .badge { 43 | border: none !important; 44 | padding: 0.3rem 0.45rem !important; 45 | } 46 | #jedchecker .badge.bg-info { 47 | background-color: #2a69b8 !important; 48 | color: #fff; 49 | } 50 | 51 | /* Alerts */ 52 | #jedchecker .alert::before { 53 | content: attr(data-level); 54 | position: absolute; 55 | top: -.5rem; 56 | left: .5rem; 57 | padding: .25rem .5rem; 58 | font-size: .75rem; 59 | font-weight: bold; 60 | line-height: 1; 61 | border-radius: .25rem; 62 | } 63 | #jedchecker .alert.alert-danger { 64 | color: #761817; 65 | background-color: #f3d4d4; 66 | border-color: #eebfbe; 67 | } 68 | #jedchecker .alert.alert-danger::before { 69 | background-color: #761817; 70 | color: #f3d4d4; 71 | } 72 | #jedchecker .alert.alert-warning { 73 | color: #664808; 74 | background-color: #fff0d0; 75 | border-color: #ffe9b9; 76 | } 77 | #jedchecker .alert.alert-warning::before { 78 | background-color: #664808; 79 | color: #fff0d0; 80 | } 81 | #jedchecker .alert.alert-secondary { 82 | color: #2c3034; 83 | background-color: #dbdcdd; 84 | border-color: #c8cbcd; 85 | } 86 | #jedchecker .alert.alert-secondary::before { 87 | background-color: #2c3034; 88 | color: #dbdcdd; 89 | } 90 | #jedchecker .alert.alert-info { 91 | color: #193f6e; 92 | background-color: #d4e1f1; 93 | border-color: #bfcbd9; 94 | } 95 | #jedchecker .alert.alert-info::before { 96 | background-color: #193f6e; 97 | color: #d4e1f1; 98 | } 99 | #jedchecker .alert pre { 100 | margin-bottom: 0; 101 | white-space: pre; 102 | } 103 | 104 | /* fixes for Joomla! 3.x */ 105 | #jedchecker input[type="file"] { 106 | height: auto; 107 | } 108 | #jedchecker .fade.show { 109 | opacity: 1; 110 | } 111 | #jedchecker .collapse { 112 | height: inherit; 113 | } 114 | #jedchecker .tooltip > .tooltip-arrow { 115 | border-style: none; 116 | } 117 | -------------------------------------------------------------------------------- /media/com_jedchecker/css/style.min.css: -------------------------------------------------------------------------------- 1 | @-webkit-keyframes spinner-border{to{transform:rotate(360deg)}}@keyframes spinner-border{to{transform:rotate(360deg)}}#jedchecker .spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}#jedchecker .spinner-border-sm{width:1rem;height:1rem;border-width:.2em}#jedchecker .spinner-border.hidden{display:none}#jedchecker .list-group-item-action.list-group-item-action.active{color:#fff;background-color:#132f53!important;border-color:#132f53!important}#jedchecker .badge{border:0!important;padding:.3rem .45rem!important}#jedchecker .badge.bg-info{background-color:#2a69b8!important;color:#fff}#jedchecker .alert::before{content:attr(data-level);position:absolute;top:-.5rem;left:.5rem;padding:.25rem .5rem;font-size:.75rem;font-weight:700;line-height:1;border-radius:.25rem}#jedchecker .alert.alert-danger{color:#761817;background-color:#f3d4d4;border-color:#eebfbe}#jedchecker .alert.alert-danger::before{background-color:#761817;color:#f3d4d4}#jedchecker .alert.alert-warning{color:#664808;background-color:#fff0d0;border-color:#ffe9b9}#jedchecker .alert.alert-warning::before{background-color:#664808;color:#fff0d0}#jedchecker .alert.alert-secondary{color:#2c3034;background-color:#dbdcdd;border-color:#c8cbcd}#jedchecker .alert.alert-secondary::before{background-color:#2c3034;color:#dbdcdd}#jedchecker .alert.alert-info{color:#193f6e;background-color:#d4e1f1;border-color:#bfcbd9}#jedchecker .alert.alert-info::before{background-color:#193f6e;color:#d4e1f1}#jedchecker .alert pre{margin-bottom:0;white-space:pre}#jedchecker input[type=file]{height:auto}#jedchecker .fade.show{opacity:1}#jedchecker .collapse{height:inherit}#jedchecker .tooltip>.tooltip-arrow{border-style:none} -------------------------------------------------------------------------------- /media/com_jedchecker/js/script.js: -------------------------------------------------------------------------------- 1 | (() => { 2 | 'use strict'; 3 | 4 | let jedOptions; 5 | try { 6 | jedOptions = JSON.parse(document.getElementById('jed-rules-json').innerHTML); 7 | if (!jedOptions) throw new Error(); 8 | } catch (e) { 9 | throw new Error('Initialization data is missing'); 10 | } 11 | 12 | const add_validation = () => { 13 | // Loop over them and prevent submission 14 | [...document.querySelectorAll('.needs-validation')].forEach(form => { 15 | form.addEventListener('submit', (event) => { 16 | const form = event.target; 17 | if (form.checkValidity() === false) { 18 | event.preventDefault(); 19 | event.stopPropagation(); 20 | } 21 | form.classList.add('was-validated'); 22 | }, false); 23 | }); 24 | } 25 | 26 | function check(url, rule) { 27 | fetch(`${url}index.php?option=com_jedchecker&task=police.check&format=raw&rule=${rule}`) 28 | .then(response => { 29 | if (!response.ok) { 30 | throw new Error(`${response.status} ${response.statusCode}`); 31 | } 32 | return response.text(); 33 | }) 34 | .then(data => { 35 | const sidebar = document.getElementById(`jed-${rule}`); 36 | const target = document.getElementById(`police-check-result-${rule}`); 37 | 38 | target.innerHTML = data; 39 | 40 | const error = target.querySelectorAll('.alert-danger').length; 41 | [...sidebar.querySelectorAll('.badge.bg-danger')].forEach(el => el.textContent = error || ''); 42 | 43 | const warning = target.querySelectorAll('.alert-warning').length; 44 | [...sidebar.querySelectorAll('.badge.bg-warning')].forEach(el => el.textContent = warning || ''); 45 | 46 | const compat = target.querySelectorAll('.alert-secondary').length; 47 | [...sidebar.querySelectorAll('.badge.bg-secondary')].forEach(el => el.textContent = compat || ''); 48 | 49 | const info = target.querySelectorAll('.alert-info').length; 50 | [...sidebar.querySelectorAll('.badge.bg-info')].forEach(el => el.textContent = info || ''); 51 | 52 | const success = target.querySelectorAll('.alert-success').length; 53 | [...sidebar.querySelectorAll('.badge.bg-success')].forEach(el => el.classList.toggle('hidden', !success)); 54 | 55 | [...sidebar.querySelectorAll('.spinner-border')].forEach(el => el.classList.add('hidden')); 56 | }) 57 | .catch(error => { 58 | console.error(error); 59 | const sidebar = document.getElementById(`jed-${rule}`); 60 | const target = document.getElementById(`police-check-result-${rule}`); 61 | 62 | target.innerHTML = `${error.name}: ${error.message}`; 63 | 64 | [...sidebar.querySelectorAll('.badge.bg-danger')].forEach(el => el.textContent = '?'); 65 | [...sidebar.querySelectorAll('.badge.bg-warning, .badge.bg-secondary, .badge.bg-info')].forEach(el => el.textContent = ''); 66 | [...sidebar.querySelectorAll('.badge.bg-success, .spinner-border')].forEach(el => el.classList.add('hidden')); 67 | }); 68 | } 69 | 70 | let jed_collapse_init = false; 71 | window.Joomla.submitbutton = function (task) { 72 | if (task === 'check') { 73 | [...document.querySelectorAll('.jedchecker-results')].forEach(el => el.classList.remove('hidden')); 74 | [...document.querySelectorAll('.jedchecker-results .badge:not(.bg-success)')].forEach(el => el.innerHTML = ''); 75 | [...document.querySelectorAll('.jedchecker-results .badge.bg-success')].forEach(el => el.classList.add('hidden')); 76 | [...document.querySelectorAll('.jedchecker-results .spinner-border')].forEach(el => el.classList.remove('hidden')); 77 | [...document.querySelectorAll('.police-check-result')].forEach(el => el.innerHTML = '
'); 78 | 79 | if (!jed_collapse_init) { 80 | [...document.querySelectorAll('.card-header[data-bs-toggle]')].forEach(el => { 81 | el.classList.add('accordion'); 82 | el.classList.add('accordion-button'); 83 | el.classList.add('collapsed'); 84 | el.setAttribute('href', el.dataset.href); 85 | }); 86 | 87 | new bootstrap.Collapse(document.getElementById('jedchecker-welcome')); 88 | new bootstrap.Collapse(document.getElementById('jedchecker-contributors')); 89 | 90 | jed_collapse_init = true; 91 | } 92 | 93 | jedOptions['rules'].forEach(rule => check(jedOptions['url'], rule)); 94 | } else { 95 | Joomla.submitform(task); 96 | } 97 | } 98 | 99 | document.getElementById('extension-upload').addEventListener('click', () => { 100 | add_validation(); 101 | document.getElementById('jed_uploading_spinner').classList.remove('hidden'); 102 | Joomla.submitbutton('uploads.upload') 103 | }); 104 | 105 | new bootstrap.Tooltip(document.getElementById('jedchecker'), {container: 'body', selector: '[data-bs-toggle=tooltip]'}); 106 | 107 | document.addEventListener('DOMContentLoaded', () => { 108 | try { 109 | jQuery.fn.scrollspy.noConflict(); 110 | } catch (e) {} 111 | }, true); 112 | })(); 113 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base", 5 | ":preserveSemverRanges", 6 | ":disableMajorUpdates" 7 | ], 8 | "versioning": "semver", 9 | "dependencyDashboard": true, 10 | "lockFileMaintenance": { "enabled": true }, 11 | "composerIgnorePlatformReqs": ["ext-*", "lib-*"], 12 | "rangeStrategy": "update-lockfile", 13 | "constraints": { 14 | "composer": "> 2.3", 15 | "npm": "> 8.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /script.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @license GNU General Public License version 2 or later; see LICENSE.txt 10 | */ 11 | 12 | defined('_JEXEC') or die('Restricted access'); 13 | 14 | use Joomla\CMS\Factory; 15 | use Joomla\CMS\Filesystem\File; 16 | use Joomla\CMS\Installer\Adapter\ComponentAdapter; 17 | use Joomla\CMS\Language\Text; 18 | use Joomla\CMS\Log\Log; 19 | 20 | /** 21 | * Class Com_JedcheckerInstallerScript 22 | * 23 | * @since 1.5 24 | */ 25 | class Com_JedcheckerInstallerScript 26 | { 27 | protected $extension = 'com_jedchecker'; 28 | protected $min_php = '5.6.0'; 29 | protected $min_joomla = '3.8.0'; 30 | protected $parent; 31 | 32 | /** 33 | * Function executed before the the installation 34 | * 35 | * @param string $type - the installation type 36 | * @param ComponentAdapter $parent - the parent class 37 | */ 38 | public function preflight($type, $parent) 39 | { 40 | $this->parent = $parent; 41 | 42 | if (version_compare(PHP_VERSION, $this->min_php, '<')) 43 | { 44 | $this->loadLanguage(); 45 | 46 | $msg = Text::sprintf('COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE', PHP_VERSION, $this->min_php); 47 | Log::add($msg, Log::WARNING, 'jerror'); 48 | 49 | return false; 50 | } 51 | 52 | if (version_compare(JVERSION, $this->min_joomla, '<')) 53 | { 54 | $this->loadLanguage(); 55 | 56 | $msg = Text::sprintf('COM_JEDCHECKER_JOOMLA_VERSION_INCOMPATIBLE', JVERSION, $this->min_joomla); 57 | Log::add($msg, Log::WARNING, 'jerror'); 58 | 59 | return false; 60 | } 61 | } 62 | 63 | /** 64 | * Update cleans out any old rules. 65 | * 66 | * @param ComponentAdapter $parent Is the class calling this method. 67 | * 68 | * @return bool|null If this returns false, Joomla will abort the update and undo everything already done. 69 | */ 70 | public function update($parent) 71 | { 72 | $this->loadLanguage(); 73 | 74 | // Doing it this way in case there are other old rules to be deleted 75 | $oldRules = array('htmlindexes'); 76 | 77 | foreach ($oldRules as $rule) 78 | { 79 | $rulePhpFile = JPATH_ADMINISTRATOR . '/components/' . $this->extension . '/libraries/rules/' . $rule . '.php'; 80 | $ruleIniFile = JPATH_ADMINISTRATOR . '/components/' . $this->extension . '/libraries/rules/' . $rule . '.ini'; 81 | 82 | // Remove the rule's php file 83 | if (file_exists($rulePhpFile)) 84 | { 85 | if (File::delete($rulePhpFile)) 86 | { 87 | $msg = Text::sprintf('COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED', $rule); 88 | } 89 | else 90 | { 91 | $msg = Text::sprintf('COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_NOT_REMOVED', $rule); 92 | } 93 | 94 | echo "

$msg

"; 95 | } 96 | 97 | // Remove the rule's ini file 98 | if (file_exists($ruleIniFile)) 99 | { 100 | if (File::delete($ruleIniFile)) 101 | { 102 | $msg = Text::sprintf('COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED', $rule); 103 | } 104 | else 105 | { 106 | $msg = Text::sprintf('COM_JEDCHECKER_OLD_RULE_X_INI_FILE_NOT_REMOVED', $rule); 107 | } 108 | 109 | echo "

$msg

"; 110 | } 111 | } 112 | } 113 | 114 | /** 115 | * Load language necessary during the installation 116 | * 117 | * @return void 118 | */ 119 | public function loadLanguage() 120 | { 121 | $extension = $this->extension; 122 | $jlang = Factory::getLanguage(); 123 | $path = $this->parent->getParent()->getPath('source') . '/administrator/components/' . $extension; 124 | $jlang->load($extension, $path, 'en-GB', true); 125 | $jlang->load($extension, $path, $jlang->getDefault(), true); 126 | $jlang->load($extension, $path, null, true); 127 | $jlang->load($extension . '.sys', $path, 'en-GB', true); 128 | $jlang->load($extension . '.sys', $path, $jlang->getDefault(), true); 129 | $jlang->load($extension . '.sys', $path, null, true); 130 | } 131 | } 132 | --------------------------------------------------------------------------------