Submit
Path:
~
/
/
opt
/
psa
/
phpMyAdmin
/
libraries
/
classes
/
Controllers
/
File Content:
ChangeLogController.php
<?php /** * Simple script to set correct charset for changelog */ declare(strict_types=1); namespace PhpMyAdmin\Controllers; use PhpMyAdmin\Core; use function __; use function array_keys; use function basename; use function file_get_contents; use function htmlspecialchars; use function is_readable; use function ob_get_clean; use function ob_start; use function preg_replace; use function printf; use function readgzfile; use function substr; class ChangeLogController extends AbstractController { public function __invoke(): void { $this->response->disable(); $this->response->getHeader()->sendHttpHeaders(); $filename = CHANGELOG_FILE; /** * Read changelog. */ // Check if the file is available, some distributions remove these. if (! @is_readable($filename)) { printf( __( 'The %s file is not available on this system, please visit %s for more information.' ), basename($filename), '<a href="' . Core::linkURL('https://www.phpmyadmin.net/') . '" rel="noopener noreferrer" target="_blank">phpmyadmin.net</a>' ); return; } // Test if the if is in a compressed format if (substr($filename, -3) === '.gz') { ob_start(); readgzfile($filename); $changelog = ob_get_clean(); } else { $changelog = file_get_contents($filename); } /** * Whole changelog in variable. */ $changelog = htmlspecialchars((string) $changelog); $github_url = 'https://github.com/phpmyadmin/phpmyadmin/'; $faq_url = 'https://docs.phpmyadmin.net/en/latest/faq.html'; $replaces = [ '@(https?://[./a-zA-Z0-9.-_-]*[/a-zA-Z0-9_])@' => '<a href="url.php?url=\\1">\\1</a>', // mail address '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +<(.*@.*)>/i' => '\\1 <a href="mailto:\\3">\\2</a>', // FAQ entries '/FAQ ([0-9]+)\.([0-9a-z]+)/i' => '<a href="url.php?url=' . $faq_url . '#faq\\1-\\2">FAQ \\1.\\2</a>', // GitHub issues '/issue\s*#?([0-9]{4,5}) /i' => '<a href="url.php?url=' . $github_url . 'issues/\\1">issue #\\1</a> ', // CVE/CAN entries '/((CAN|CVE)-[0-9]+-[0-9]+)/' => '<a href="url.php?url=' . 'https://www.cve.org/CVERecord?id=\\1">\\1</a>', // PMASAentries '/(PMASA-[0-9]+-[0-9]+)/' => '<a href="url.php?url=https://www.phpmyadmin.net/security/\\1/">\\1</a>', // Highlight releases (with links) '/([0-9]+)\.([0-9]+)\.([0-9]+)\.0 (\([0-9-]+\))/' => '<a id="\\1_\\2_\\3"></a>' . '<a href="url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3">' . '\\1.\\2.\\3.0 \\4</a>', '/([0-9]+)\.([0-9]+)\.([0-9]+)\.([1-9][0-9]*) (\([0-9-]+\))/' => '<a id="\\1_\\2_\\3_\\4"></a>' . '<a href="url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3_\\4">' . '\\1.\\2.\\3.\\4 \\5</a>', // Highlight releases (not linkable) '/( ### )(.*)/' => '\\1<b>\\2</b>', // Links target and rel '/a href="/' => 'a target="_blank" rel="noopener noreferrer" href="', ]; $this->response->header('Content-type: text/html; charset=utf-8'); echo $this->template->render('changelog', [ 'changelog' => preg_replace(array_keys($replaces), $replaces, $changelog), ]); } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
Config
---
0755
Database
---
0755
Export
---
0755
Import
---
0755
Preferences
---
0755
Server
---
0755
Setup
---
0755
Sql
---
0755
Table
---
0755
Transformation
---
0755
View
---
0755
AbstractController.php
2590 bytes
0644
BrowseForeignersController.php
2468 bytes
0644
ChangeLogController.php
3647 bytes
0644
CheckRelationsController.php
2301 bytes
0644
CollationConnectionController.php
809 bytes
0644
ColumnController.php
1064 bytes
0644
DatabaseController.php
275 bytes
0644
ErrorReportController.php
6198 bytes
0644
GisDataEditorController.php
5543 bytes
0644
GitInfoController.php
1220 bytes
0644
HomeController.php
17825 bytes
0644
JavaScriptMessagesController.php
37187 bytes
0644
LicenseController.php
940 bytes
0644
LintController.php
2035 bytes
0644
LogoutController.php
421 bytes
0644
NavigationController.php
3278 bytes
0644
NormalizationController.php
5669 bytes
0644
PhpInfoController.php
685 bytes
0644
RecentTablesListController.php
426 bytes
0644
SchemaExportController.php
667 bytes
0644
TableController.php
820 bytes
0644
ThemeSetController.php
1257 bytes
0644
ThemesController.php
772 bytes
0644
UserPasswordController.php
3379 bytes
0644
VersionCheckController.php
1224 bytes
0644
N4ST4R_ID | Naxtarrr