diff --git a/LICENSES/GPL-2.0-only.txt b/LICENSES/GPL-2.0-only.txt new file mode 100644 index 0000000000000..17cb286430a4d --- /dev/null +++ b/LICENSES/GPL-2.0-only.txt @@ -0,0 +1,117 @@ +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author + + 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 2 of the License, or (at your option) any later version. + + 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. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. + +signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php index 5b598d20672c8..60445b4b11749 100644 --- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php +++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php @@ -15,7 +15,7 @@ class GenerateMimetypeFileBuilder { * @param array $aliases * @return string */ - public function generateFile(array $aliases): string { + public function generateFile(array $aliases, array $names): string { // Remove comments $aliases = array_filter($aliases, static function ($key) { // Single digit extensions will be treated as integers @@ -71,6 +71,15 @@ public function generateFile(array $aliases): string { sort($themes[$theme]); } + $namesOutput = ''; + foreach ($names as $key => $name) { + if (str_starts_with($key, '_')) { + // Skip internal names + continue; + } + $namesOutput .= "'$key': t('core', " . json_encode($name) . "),\n"; + } + //Generate the JS return '/** * This file is automatically generated @@ -83,7 +92,8 @@ public function generateFile(array $aliases): string { OC.MimeTypeList={ aliases: ' . json_encode($aliases, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . ', files: ' . json_encode($files, JSON_PRETTY_PRINT) . ', - themes: ' . json_encode($themes, JSON_PRETTY_PRINT) . ' + themes: ' . json_encode($themes, JSON_PRETTY_PRINT) . ', + names: {' . $namesOutput . '}, }; '; } diff --git a/core/Command/Maintenance/Mimetype/UpdateJS.php b/core/Command/Maintenance/Mimetype/UpdateJS.php index 35633f1635546..2132ff54c6dfa 100644 --- a/core/Command/Maintenance/Mimetype/UpdateJS.php +++ b/core/Command/Maintenance/Mimetype/UpdateJS.php @@ -32,7 +32,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int // Output the JS $generatedMimetypeFile = new GenerateMimetypeFileBuilder(); - file_put_contents(\OC::$SERVERROOT . '/core/js/mimetypelist.js', $generatedMimetypeFile->generateFile($aliases)); + $namings = $this->mimetypeDetector->getAllNamings(); + file_put_contents(\OC::$SERVERROOT . '/core/js/mimetypelist.js', $generatedMimetypeFile->generateFile($aliases, $namings)); $output->writeln('mimetypelist.js is updated'); return 0; diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js index ed861205cf0f6..1e2aeaa3f003b 100644 --- a/core/js/mimetypelist.js +++ b/core/js/mimetypelist.js @@ -81,7 +81,6 @@ OC.MimeTypeList={ "application/x-7z-compressed": "package/x-generic", "application/x-bzip2": "package/x-generic", "application/x-cbr": "text", - "application/x-compressed": "package/x-generic", "application/x-dcraw": "image", "application/x-deb": "package/x-generic", "application/x-fictionbook+xml": "text", @@ -115,6 +114,7 @@ OC.MimeTypeList={ "text/x-h": "text/code", "text/x-java-source": "text/code", "text/x-ldif": "text/code", + "text/x-nfo": "text/code", "text/x-python": "text/code", "text/x-rst": "text", "text/x-shellscript": "text/code", @@ -151,5 +151,110 @@ OC.MimeTypeList={ "x-office-presentation", "x-office-spreadsheet" ], - themes: [] + themes: [], + names: {'application/epub+zip': t('core', "Electronic book document"), +'application/gpx+xml': t('core', "GPX geographic data"), +'application/gzip': t('core', "Gzip archive"), +'application/illustrator': t('core', "Adobe Illustrator document"), +'application/json': t('core', "JSON document"), +'application/msword': t('core', "Word document"), +'application/octet-stream': t('core', "Unknown"), +'application/pdf': t('core', "PDF document"), +'application/postscript': t('core', "PostScript document"), +'application/rss+xml': t('core', "RSS summary"), +'application/vnd.android.package-archive': t('core', "Android package"), +'application/vnd.google-earth.kml+xml': t('core', "KML geographic data"), +'application/vnd.google-earth.kmz': t('core', "KML geographic compressed data"), +'application/vnd.lotus-wordpro': t('core', "Lotus Word Pro document"), +'application/vnd.ms-excel': t('core', "Excel spreadsheet"), +'application/vnd.ms-excel.addin.macroEnabled.12': t('core', "Excel add-in"), +'application/vnd.ms-excel.sheet.binary.macroEnabled.12': t('core', "Excel 2007 binary spreadsheet"), +'application/vnd.ms-excel.sheet.macroEnabled.12': t('core', "Excel spreadsheet"), +'application/vnd.ms-excel.template.macroEnabled.12': t('core', "Excel spreadsheet template"), +'application/vnd.ms-powerpoint': t('core', "PowerPoint presentation"), +'application/vnd.ms-powerpoint.addin.macroEnabled.12': t('core', "PowerPoint add-in"), +'application/vnd.ms-powerpoint.presentation.macroEnabled.12': t('core', "PowerPoint presentation"), +'application/vnd.ms-powerpoint.slideshow.macroEnabled.12': t('core', "PowerPoint presentation"), +'application/vnd.ms-powerpoint.template.macroEnabled.12': t('core', "PowerPoint presentation template"), +'application/vnd.ms-word.document.macroEnabled.12': t('core', "Word document"), +'application/vnd.oasis.opendocument.formula': t('core', "ODF formula"), +'application/vnd.oasis.opendocument.graphics': t('core', "ODG drawing"), +'application/vnd.oasis.opendocument.graphics-flat-xml': t('core', "ODG drawing (Flat XML)"), +'application/vnd.oasis.opendocument.graphics-template': t('core', "ODG template"), +'application/vnd.oasis.opendocument.presentation': t('core', "ODP presentation"), +'application/vnd.oasis.opendocument.presentation-flat-xml': t('core', "ODP presentation (Flat XML)"), +'application/vnd.oasis.opendocument.presentation-template': t('core', "ODP template"), +'application/vnd.oasis.opendocument.spreadsheet': t('core', "ODS spreadsheet"), +'application/vnd.oasis.opendocument.spreadsheet-flat-xml': t('core', "ODS spreadsheet (Flat XML)"), +'application/vnd.oasis.opendocument.spreadsheet-template': t('core', "ODS template"), +'application/vnd.oasis.opendocument.text': t('core', "ODT document"), +'application/vnd.oasis.opendocument.text-flat-xml': t('core', "ODT document (Flat XML)"), +'application/vnd.oasis.opendocument.text-template': t('core', "ODT template"), +'application/vnd.openxmlformats-officedocument.presentationml.presentation': t('core', "PowerPoint 2007 presentation"), +'application/vnd.openxmlformats-officedocument.presentationml.slideshow': t('core', "PowerPoint 2007 show"), +'application/vnd.openxmlformats-officedocument.presentationml.template': t('core', "PowerPoint 2007 presentation template"), +'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': t('core', "Excel 2007 spreadsheet"), +'application/vnd.openxmlformats-officedocument.spreadsheetml.template': t('core', "Excel 2007 spreadsheet template"), +'application/vnd.openxmlformats-officedocument.wordprocessingml.document': t('core', "Word 2007 document"), +'application/vnd.openxmlformats-officedocument.wordprocessingml.template': t('core', "Word 2007 document template"), +'application/vnd.visio': t('core', "Microsoft Visio document"), +'application/vnd.wordperfect': t('core', "WordPerfect document"), +'application/x-7z-compressed': t('core', "7-zip archive"), +'application/x-blender': t('core', "Blender scene"), +'application/x-bzip2': t('core', "Bzip2 archive"), +'application/x-fictionbook+xml': t('core', "FictionBook document"), +'application/x-krita': t('core', "Krita document"), +'application/x-mobipocket-ebook': t('core', "Mobipocket e-book"), +'application/x-msi': t('core', "Windows Installer package"), +'application/x-perl': t('core', "Perl script"), +'application/x-php': t('core', "PHP script"), +'application/x-tar': t('core', "Tar archive"), +'application/xml': t('core', "XML document"), +'application/yaml': t('core', "YAML document"), +'application/zip': t('core', "Zip archive"), +'application/zstd': t('core', "Zstandard archive"), +'audio/aac': t('core', "AAC audio"), +'audio/flac': t('core', "FLAC audio"), +'audio/mp4': t('core', "MPEG-4 audio"), +'audio/mpeg': t('core', "MP3 audio"), +'audio/ogg': t('core', "Ogg audio"), +'audio/webm': t('core', "WebM audio"), +'audio/x-scpls': t('core', "MP3 ShoutCast playlist"), +'image/bmp': t('core', "Windows BMP image"), +'image/emf': t('core', "EMF image"), +'image/gif': t('core', "GIF image"), +'image/heif': t('core', "HEIF image"), +'image/jp2': t('core', "JPEG-2000 JP2 image"), +'image/jpeg': t('core', "JPEG image"), +'image/png': t('core', "PNG image"), +'image/svg+xml': t('core', "SVG image"), +'image/tiff': t('core', "TIFF image"), +'image/webp': t('core', "WebP image"), +'image/x-dcraw': t('core', "Digital raw image"), +'message/rfc822': t('core', "Email message"), +'text/calendar': t('core', "VCS\/ICS calendar"), +'text/css': t('core', "CSS stylesheet"), +'text/csv': t('core', "CSV document"), +'text/html': t('core', "HTML document"), +'text/markdown': t('core', "Markdown document"), +'text/org': t('core', "Org-mode file"), +'text/plain': t('core', "Plain text document"), +'text/vcard': t('core', "Electronic business card"), +'text/x-c++src': t('core', "C++ source code"), +'text/x-ldif': t('core', "LDIF address book"), +'text/x-nfo': t('core', "NFO document"), +'text/x-python': t('core', "Python script"), +'text/x-rst': t('core', "ReStructuredText document"), +'video/3gpp': t('core', "3GPP multimedia file"), +'video/dv': t('core', "DV video"), +'video/mp2t': t('core', "MPEG-2 transport stream"), +'video/mp4': t('core', "MPEG-4 video"), +'video/mpeg': t('core', "MPEG video"), +'video/ogg': t('core', "Ogg video"), +'video/quicktime': t('core', "QuickTime video"), +'video/webm': t('core', "WebM video"), +'video/x-flv': t('core', "Flash video"), +'video/x-matroska': t('core', "Matroska video"), +'video/x-ms-wmv': t('core', "Windows Media video"), +}, }; diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php index 42315247dbf0e..2eaa7dadbc6a7 100644 --- a/lib/private/Files/Type/Detection.php +++ b/lib/private/Files/Type/Detection.php @@ -23,6 +23,7 @@ class Detection implements IMimeTypeDetector { private const CUSTOM_MIMETYPEMAPPING = 'mimetypemapping.json'; private const CUSTOM_MIMETYPEALIASES = 'mimetypealiases.json'; + private const CUSTOM_MIMETYPENAMES = 'mimetypenames.json'; /** @var array */ protected array $mimeTypes = []; @@ -31,6 +32,8 @@ class Detection implements IMimeTypeDetector { protected array $mimeTypeIcons = []; /** @var array */ protected array $mimeTypeAlias = []; + /** @var array */ + protected array $mimeTypesNames = []; public function __construct( private IURLGenerator $urlGenerator, @@ -148,6 +151,25 @@ public function getAllMappings(): array { return $this->mimeTypes; } + private function loadNamings(): void { + if (!empty($this->mimeTypesNames)) { + return; + } + + $mimeTypeMapping = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypenames.dist.json'), true); + $mimeTypeMapping = $this->loadCustomDefinitions(self::CUSTOM_MIMETYPENAMES, $mimeTypeMapping); + + $this->mimeTypesNames = $mimeTypeMapping; + } + + /** + * @return array + */ + public function getAllNamings(): array { + $this->loadNamings(); + return $this->mimeTypesNames; + } + /** * detect MIME type only based on filename, content of file is not used * diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php index 361fe8e9b2d77..2bd6e426b793e 100644 --- a/lib/private/IntegrityCheck/Checker.php +++ b/lib/private/IntegrityCheck/Checker.php @@ -148,10 +148,10 @@ private function generateHashes(\RecursiveIteratorIterator $iterator, } if ($filename === $this->environmentHelper->getServerRoot() . '/core/js/mimetypelist.js') { $oldMimetypeList = new GenerateMimetypeFileBuilder(); - $newFile = $oldMimetypeList->generateFile($this->mimeTypeDetector->getAllAliases()); + $newFile = $oldMimetypeList->generateFile($this->mimeTypeDetector->getAllAliases(), $this->mimeTypeDetector->getAllNamings()); $oldFile = $this->fileAccessHelper->file_get_contents($filename); if ($newFile === $oldFile) { - $hashes[$relativeFileName] = hash('sha512', $oldMimetypeList->generateFile($this->mimeTypeDetector->getOnlyDefaultAliases())); + $hashes[$relativeFileName] = hash('sha512', $oldMimetypeList->generateFile($this->mimeTypeDetector->getOnlyDefaultAliases(), $this->mimeTypeDetector->getAllNamings())); continue; } } diff --git a/lib/public/Files/IMimeTypeDetector.php b/lib/public/Files/IMimeTypeDetector.php index 1bc9c51461093..1e87cf932ce42 100644 --- a/lib/public/Files/IMimeTypeDetector.php +++ b/lib/public/Files/IMimeTypeDetector.php @@ -87,4 +87,12 @@ public function getAllAliases(): array; * @since 32.0.0 */ public function getAllMappings(): array; + + /** + * Get all human readable mime names + * + * @return array + * @since 32.0.0 + */ + public function getAllNamings(): array; } diff --git a/resources/config/freedesktop.org.xml b/resources/config/freedesktop.org.xml new file mode 100644 index 0000000000000..0521c3526de27 --- /dev/null +++ b/resources/config/freedesktop.org.xml @@ -0,0 +1,9233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + + + + Atari 2600 ROM + + + + + Atari 7800 ROM + + + + + + + + Atari Lynx ROM + + + + + + + + ATK inset + ATK + Andrew Toolkit + + + + + Electronic book document + + + + + + + + + + + + + + Kindle book document + + + + + + + Adobe Illustrator document + + + + + + Macintosh BinHex-encoded file + + + + + + + + + + Mathematica Notebook file + + + + + + + + + + + + MathML document + MathML + Mathematical Markup Language + + + + + + + Mailbox file + + + + + + + + + Metalink file + + + + + + + + + Metalink file + + + + + + + + + Unknown + + + Partially downloaded file + + + + + + + ODA document + ODA + Office Document Architecture + + + + + WWF document + + + + + + + PDF document + PDF + Portable Document Format + + + + + + + + + + + + XSPF playlist + XSPF + XML Shareable Playlist Format + + + + + + + + + + + + Microsoft Windows theme pack + + + + + + AmazonMP3 download file + + + + GSM 06.10 audio + GSM + Global System for Mobile communications + + + + iRiver playlist + + + + + + + PGP/MIME-encrypted message header + + + + + + + + + + PGP keys + PGP + Pretty Good Privacy + + + + + + + + + + + + + + + + + Detached OpenPGP signature + + + + + + + + + + + PKCS#7 file + PKCS + Public-Key Cryptography Standards + + + + + + Detached S/MIME signature + S/MIME + Secure/Multipurpose Internet Mail Extensions + + + + + + PKCS#8 private key + PKCS + Public-Key Cryptography Standards + + + + PKCS#8 private key (encrypted) + PKCS + Public-Key Cryptography Standards + + + + PKCS#10 certification request + PKCS + Public-Key Cryptography Standards + + + + + X.509 certificate + + + + + + + + Certificate revocation list + + + + + + + PkiPath certification path + + + + PostScript document + + + + + + + + + + Plucker document + + + + + + + BuildStream element + + + + + + + + RAML document + RAML + RESTful API Modeling Language + + + + + + + + RELAX NG XML schema + RELAX NG + REgular LAnguage for XML Next Generation + + + + + + + RTF document + RTF + Rich Text Format + + + + + + + + + + Sieve mail filter script + + + + + + SMIL document + SMIL + Synchronized Multimedia Integration Language + + + + + + + + + + + + + + + + WPL playlist + WPL + Windows Media Player Playlist + + + + + + + + SQLite2 database + + + + + + + SQLite3 database + + + + + + + + Apple System Profiler + + + + + + + + + + + GEDCOM family history + GEDCOM + GEnealogical Data COMmunication + + + + + + + + + + + + Flash video + + + + + + + + + + + JavaFX video + + + + + + + + + + SGF record + SGF + Smart Game Format + + + + + + + + + + Godot Engine project + + + + + Godot Engine resource + + + + + + + + Godot Engine scene + + + + + + + + + Godot Engine shader + + + + + GDScript script + + + + + ITS translation file + ITS + Internationalization Tag Set + + + + + + + + + + XLIFF translation file + XLIFF + XML Localization Interchange File Format + + + + + + + + + + + + TOML document + TOML + Tom's Obvious Minimal Language + + + + + + YAML document + YAML + YAML Ain't Markup Language + + + + + + + + + + + + + Corel Draw drawing + + + + + + + + + + + + + + + HPGL file + HPGL + HP Graphics Language + + + + + PCL file + PCL + HP Printer Control Language + + + + + PostScript printer description + + + + + + + + Lotus 1-2-3 spreadsheet + + + + + + + + + + + + + + + + + Lotus Word Pro document + + + + + + + + LMDB database + LMDB + Lightning Memory-Mapped Database + + + + + + + + + JET database + JET + Joint Engine Technology + + + + + + + + + + + + + + Microsoft Cabinet archive + + + + + + + + + Excel spreadsheet + + + + + + + + + + + + + + + + + + + + + + + Excel add-in + + + + + + Excel 2007 binary spreadsheet + + + + + + Excel spreadsheet + + + + + + Excel spreadsheet template + + + + + + PowerPoint presentation + + + + + + + + + + + + + + + + + + PowerPoint add-in + + + + + PowerPoint presentation + + + + + + PowerPoint slide + + + + + + PowerPoint presentation + + + + + + PowerPoint presentation template + + + + + + Office Open XML Visio drawing + + + + + + Office Open XML Visio template + + + + + + Office Open XML Visio stencil + + + + + + Office Open XML Visio drawing + + + + + + Office Open XML Visio template + + + + + + Office Open XML Visio stencil + + + + + + Word document + + + + + + Word document template + + + + + + OpenXPS document + OpenXPS + Open XML Paper Specification + + + + + + XPS document + XPS + XML Paper Specification + + + + + + + Microsoft Works document + + + + + + + + + + + + + + + + + + + + Microsoft Visio document + + + + + + + + + + + + + + + Word document + + + + + + + + + + + + + + + + + + + + + + Word template + + + + + + GML document + GML + Geography Markup Language + + + + + + GNUnet search file + + + + + + + TNEF message + TNEF + Transport Neutral Encapsulation Format + + + + + + + + + + StarCalc 3-4 spreadsheet + + + + + + + + + + + + StarChart 3-4 chart + + + + + + + + + + + + StarDraw 4 drawing + + + + + + + + + + + StarImpress 3-4 presentation + + + + + + + + + + + + StarMail 4 email + + + + + + + + StarMath 3-4 formula + + + + + + + + + + + + StarWriter 3-4 document + + + + + + + + + + + + + StarWriter 4 master document + + + + + + + + + + + StarCalc 5 spreadsheet + + + + + + + + + + + StarChart 5 chart + + + + + + + + + + + StarDraw 5 drawing + + + + + + + + + + + StarImpress 5 presentation + + + + + + + + + + + StarImpress packed presentation + + + + + + + + StarMail 5 email + + + + + + + + + + + StarMath 5 formula + + + + + + + + + + + StarWriter 5 document + + + + + + + + + + + + + StarWriter 5 master document + + + + + + + + + + + OpenOffice.org 1.0 Calc spreadsheet + + + + + + + + + + + + + OpenOffice.org 1.0 Calc template + + + + + + + + + + + + + OpenOffice.org 1.0 Draw drawing + + + + + + + + + + + + + OpenOffice.org 1.0 Draw template + + + + + + + + + + + + + OpenOffice.org 1.0 Impress presentation + + + + + + + + + + + + + OpenOffice.org 1.0 Impress template + + + + + + + + + + + + + OpenOffice.org 1.0 Math formula + + + + + + + + + + + + + OpenOffice.org 1.0 Writer document + + + + + + + + + + + + + OpenOffice.org 1.0 Writer global document + + + + + + + + + + + + + OpenOffice.org 1.0 Writer template + + + + + + + + + + + + + ODT document + ODT + OpenDocument Text + + + + + + + + + + + + + ODT document (Flat XML) + FODT + OpenDocument Text (Flat XML) + + + + + + ODT template + ODT + OpenDocument Text + + + + + + + + + + + + + OTH template + OTH + OpenDocument HTML + + + + + + + + + + + + + ODM document + ODM + OpenDocument Master + + + + + + + + + + + + + ODM template + ODM + OpenDocument Master + + + + + + + + + + + + + ODG drawing + ODG + OpenDocument Drawing + + + + + + + + + + + + + ODG drawing (Flat XML) + FODG + OpenDocument Drawing (Flat XML) + + + + + + ODG template + ODG + OpenDocument Drawing + + + + + + + + + + + + + ODP presentation + ODP + OpenDocument Presentation + + + + + + + + + + + + + ODP presentation (Flat XML) + FODP + OpenDocument Presentation (Flat XML) + + + + + + ODP template + ODP + OpenDocument Presentation + + + + + + + + + + + + + ODS spreadsheet + ODS + OpenDocument Spreadsheet + + + + + + + + + + + + + ODS spreadsheet (Flat XML) + FODS + OpenDocument Spreadsheet (Flat XML) + + + + + + ODS template + ODS + OpenDocument Spreadsheet + + + + + + + + + + + + + ODC chart + ODC + OpenDocument Chart + + + + + + + + + + + + + ODC template + ODC + OpenDocument Chart + + + + + + + + + + + + + ODF formula + ODF + OpenDocument Formula + + + + + + + + + + + + + ODF template + ODF + OpenDocument Formula + + + + + + + + + + + + + ODB database + ODB + OpenDocument Database + + + + + + + + + + + + + + + ODI image + ODI + OpenDocument Image + + + + + + + + + + + + + LibreOffice extension + + + + + + Apache Parquet file + + + + + + + + + + Android package + + + + + SIS package + SIS + Symbian Installation File + + + + + + + + SISX package + SIS + Symbian Installation File + + + + + + + + Network packet capture + + + + + + + + + + + + PCAPNG packet capture + PCAPNG + PCAP Next Generation + + + + + + + + + + + + WordPerfect document + + + + + + + + + + + + + + + + + + + YouTube media archive + + + + + + + + + + SPSS portable data file + SPSS + Statistical Package for the Social Sciences + + + + + + + SPSS data file + SPSS + Statistical Package for the Social Sciences + + + + + + + + + + XBEL bookmarks + XBEL + XML Bookmark Exchange Language + + + + + + + + + 7-zip archive + + + + + + + + + AbiWord document + + + + + + + + + + + + + + CD image cuesheet + + + + + + Lotus AmiPro document + + + + + AportisDoc document + + + + + + + + + + + Protein Data Bank file + + + + + + + + + + Applix Spreadsheets spreadsheet + + + + + + + + + + + Applix Words document + + + + + + + + + + ARC archive + + + + + + + + + + + + AR archive + + + + + + + + + + + ARJ archive + ARJ + Archived by Robert Jung + + + + + + + + Electron Archive (ASAR) + ASAR + Atom Shell Archive Format + + + + + + + + + ASP page + ASP + Active Server Page + + + + + + AWK script + + + + + + + + + + + + + + + + + + + BCPIO archive + BCPIO + Binary CPIO + + + + + BitTorrent seed file + + + + + + + Blender scene + + + + + + + + + TeX DVI document (bzip2-compressed) + + + + + + Bzip1 archive + + + + + + + + Tar archive (bzip1-compressed) + + + + + + + Bzip2 archive + + + + + + + + + + Tar archive (bzip2-compressed) + + + + + + + + + Bzip3 archive + + + + + + + + Tar archive (bzip3-compressed) + + + + + + + PDF document (bzip2-compressed) + + + + + + PostScript document (bzip2-compressed) + + + + + + Comic book archive (rar container) + + + + + + + Comic book archive (7z container) + + + + + + Comic book archive (tar container) + + + + + + Comic book archive (zip container) + + + + + + + Rzip archive + + + + + + + + Tar archive (rzip-compressed) + + + + + + + Lrzip archive + Lrzip + Long Range Zip + + + + + + + + Tar archive (lrzip-compressed) + + + + + + + Apple disk image + + + + Raw disk image + + + + + + + + + + + + + Floppy disk image + + + + + + + + Raw disk image (XZ-compressed) + + + + + + Raw CD image + + + + + + + + + + Compressed CD image + + + + + + + + AppImage application bundle + + + + + + + + + + + + + + + + CD Table Of Contents + + + + + + + + + + + + + + + GD-ROM image cuesheet + + + + + + + Padus DiscJuggler CD image + + + + + PGN chess game notation + PGN + Portable Game Notation + + + + + + + + + + CHM document + CHM + Compiled Help Modules + + + + + + Java byte code + + + UNIX-compressed file + + + + + + + + Tar archive (gzip-compressed) + + + + + + + Program crash data + + + + + + + + + + + + + + + + + + + CPIO archive + + + + + + + + + + + CPIO archive (gzip-compressed) + + + + + + Perf data + + + + + + + C shell script + + + + + + + + + + + + + Xbase document + + + + + + + + + ECMAScript program + + + + + + + MAME compressed hard disk image + + + + + + + + + Sega CD disc image + + + + + + + + + + + + + + + Sega Pico ROM + + + + + + + + Sega Saturn disc image + + + + + + + + + Dreamcast disc image + + + + + + + + Nintendo DS ROM + + + + + Nintendo 3DS ROM + + + + + + + + + Nintendo 3DS Executable + + + + + + + + Nintendo Switch encrypted ROM + + + + + + + + + + + + + + + PC Engine ROM + + + + + Wii disc image + + + + + + + + + + + + + WiiWare bundle + + + + + + + + + + GameCube disc image + + + + + + + + + Thomson Mémo7 cartridge + + + + + Thomson cassette + + + + + HFE floppy disk image + HFE + HxC Floppy Emulator + + + + + + + + + SAP Thomson floppy disk image + SAP + Système d'Archivage Pukall + + + + + + + + + Debian package + + + + + + + + + + + + + Qt Designer interface document + + + + + + + + + + Kaitai Struct definition file + + + + + Qt Markup Language file + + + + + + + + + + + + + + + + Desktop entry + + + + + + + + + + + + + + + FictionBook document + + + + + + + + + + Compressed FictionBook document + + + + + + + + + + + Dia diagram + + + + + + + + + + Dia shape + + + + + + + + + + TeX DVI document + DVI + Device independent file format + + + + + + + + Enlightenment theme + + + + Egon Animator animation + + + + + Executable + + + + + + + + + + + + + + + + FLTK Fluid file + FLTK + Fast Light Toolkit + + + + + + + + + WOFF font + WOFF + Web Open Font Format + + + + + + + + + WOFF2 font + WOFF2 + Web Open Font Format 2.0 + + + + + + + + PostScript type-1 font + + + + + + + + + + + + + + + + Adobe font metrics + + + + + BDF font + + + + + + + + DOS font + + + + + + + + + Adobe FrameMaker font + + + + + + + LIBGRX font + + + + + + + Linux PSF console font + PSF + PC Screen Font + + + + + + + + Linux PSF console font (gzip-compressed) + PSF + PC Screen Font + + + + + + PCF font + PCF + Portable Compiled Format + + + + + + + + + + OpenType font + + + + + + + + + + Speedo font + + + + + + + + SunOS News font + + + + + + + + + TDPFR font + TDPFR + TrueDoc Portable Font Resource + + + + + + + + + + TeX font + + + + + + + + + TeX font metrics + + + + + + + + TrueType font + + + + + + + + + + + Font collection + + + + + TrueType XML font + + + + + + + + + V font + + + + + + + Adobe FrameMaker document + + + + + + + + + + + + + + + Game Boy ROM + + + + + + + + + + + Game Boy Color ROM + + + + + + + + + + + Game Boy Advance ROM + + + + + + Virtual Boy ROM + + + + + GDBM database + GDBM + GNU Database Manager + + + + + + + + + Genesis ROM + + + + + + + + + + + + + + + + + Genesis 32X ROM + + + + + + + + + Translated messages (machine-readable) + + + + + + + + + GTK+ Builder interface document + + + + + + + + + Glade project + + + + + + + + + GnuCash financial data + + + + + + + Gnumeric spreadsheet + + + + + + + + + Gnuplot document + + + + + + + + Graphite scientific graph + + + + + GTKtalog catalog + + + + + + + TeX DVI document (gzip-compressed) + + + + + + Gzip archive + + + + + + + + + PDF document (gzip-compressed) + + + + + + PostScript document (gzip-compressed) + + + + + + HDF document + HDF + Hierarchical Data Format + + + + + + + + + + + + + IFF file + IFF + Interchange File Format + + + + + + iPod firmware + + + + + + Java archive + + + + + + + + Java class + + + + + + + + + + + + Groovy source code + + + + + + + + + + + + + + + + Gradle script + + + + + JNLP file + JNLP + Java Network Launching Protocol + + + + + + + + + Java keystore + + + + + + + + + Java JCE keystore + JCE + Java Cryptography Extension + + + + + + + Pack200 Java archive + + + + + + + + JavaScript program + + + + + + + + + + + + + + + + + + + + + + + + Encoded JScript program + + + + + + + + + TypeScript program + + + + + + + + + + + + + + + JSON document + JSON + JavaScript Object Notation + + + + + + JSON5 document + JSON5 + JavaScript Object Notation 5 + + + + + + JRD document + JRD + JSON Resource Descriptor + + + + + + JSON patch + JSON + JavaScript Object Notation + + + + + + JSON-LD document + JSON-LD + JavaScript Object Notation for Linked Data + + + + + + JSON schema + + + + + + + + + + + Jupyter notebook document + + + + + + + + + + + CoffeeScript document + + + + + + JBuilder project + + + + + + Karbon14 drawing + + + + + + + + + + + + + + + + + KChart chart + + + + + + + + + + + + + + + + + Kexi settings + + + + Kexi shortcut + + + + Kexi database file + + + + + Kexi database file + + + + + + + KFormula formula + + + + + + + + + + + + + + + + + KIllustrator drawing + + + + + + + + + + + + Kivio flowchart + + + + + + + + + + + + + + + + + Kontour drawing + + + + + + + + + + + + + + + + + KPovModeler scene + + + + + KPresenter presentation + + + + + + + + + + + + + + + + + + Krita document + + + + + + + + + + + + + + + + + + + + + KSpread spreadsheet + + + + + + + + + + + + + + + + + KSpread spreadsheet (encrypted) + + + + + + + KSysV init package + + + + + + + + + Kugar document + + + + + KWord document + + + + + + + + + + + + + + + + + + KWord document (encrypted) + + + + + + + LHA archive + + + + + + + + + + + + + + + + + + + + + LHZ archive + + + + + Message catalog + + + + + + + + + + + LyX document + + + + + + + + + + LZ4 archive + + + + + + + + + Tar archive (LZ4-compressed) + + + + + + Lzip archive + + + + + + + + Tar archive (lzip-compressed) + + + + + + PDF document (lzip-compressed) + + + + + + LZMA archive + LZMA + Lempel-Ziv-Markov chain-Algorithm + + + + + Tar archive (LZMA-compressed) + + + + + + + LZO archive + LZO + Lempel-Ziv-Oberhumer + + + + + + + + Qpress archive + + + + + + + + XAR archive + XAR + eXtensible ARchive + + + + + + + + + + Zlib archive + + + + + MagicPoint presentation + + + + + + Macintosh MacBinary file + + + + + + + Matroska stream + + + + + + + + + + + + + + Matroska video + + + + + Matroska 3D video + + + + + Matroska audio + + + + + WebM video + + + + + + + + + + + + + + WebM audio + + + + MHTML web archive + MHTML + MIME HTML + + + + + + MXF video + MXF + Material Exchange Format + + + + + + + + OCL file + OCL + Object Constraint Language + + + + + COBOL source code + COBOL + COmmon Business Oriented Language + + + + + + Mobipocket e-book + + + + + + + + + + + + + + Adobe FrameMaker MIF document + + + + Mozilla bookmarks + + + + + + + + + Windows or DOS program + DOS + Disk Operating System + + + + + + + + + + + + + + DOS executable + DOS + Disk Operating System + + + + + + + + + + + 16-bit Windows program + + + + + + + + + + + + + + + Windows or EFI program + EFI + Extensible Firmware Interface + + + + + + + + + + + + + + + + + + Windows program database + + + + + + + + DOS/Windows batch file + + + + + + + PowerShell script + + + + + + + + + + Windows shortcut + + + + + + + + + Internet shortcut + + + + + + + + + + + + WRI document + + + + + MSX ROM + + + + + M4 macro + + + + + + Nintendo64 ROM + + + + + + + + + + + + + + + Nautilus link + + + + + + + + Neo-Geo Pocket ROM + + + + + + + + + + + Neo-Geo Pocket Color ROM + + + + + + + + + + + + NES ROM + + + + + + + + Unidata NetCDF document + NetCDF + Network Common Data Form + + + + + + NewzBin usenet index + + + + + + + + Object code + + + + + + + + + + + + + + + + + Annodex exchange format + + + + + + + + + + + + + Annodex video + + + + + + + + + + + + + Annodex audio + + + + + + + + + + + + + Ogg multimedia file + + + + + + + + + Ogg audio + + + + + + + + + + + Ogg video + + + + + + + + + + Ogg Vorbis audio + + + + + + + + + + + + + Ogg FLAC audio + + + + + + + + + + + + + + + Opus audio + + + + + + + + + + Ogg Speex audio + + + + + + + + + + + + Speex audio + + + + + + + Ogg Theora video + + + + + + + + + + + OGM video + + + + + + + + + + + + OLE2 compound document storage + + + + + + + Microsoft Windows Thumbnail Cache + + + + + + + + + + + + Microsoft Publisher document + + + + + + + + + + + QuarkXPress document + + + + + + + + + + + + + + Windows Installer package + + + + + + + + + + + Windows Installer patch + + + + + + + + + + + Windows Update package + + + + + + Windows app store package + + + + + + Windows app store package + + + + + + Windows app store bundle + + + + + + Windows app store bundle + + + + + + Windows app store installer + + + + + + + + + GNU Oleo spreadsheet + + + + + + + + PAK archive + + + + + Palm OS database + + + + + + + + Parchive archive + Parchive + Parity Volume Set Archive + + + + + + + + + PEF executable + PEF + Preferred Executable Format + + + + + + + Perl script + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PHP script + + + + + + + + + + + + + PKCS#7 certificate bundle + PKCS + Public-Key Cryptography Standards + + + + + PKCS#12 certificate bundle + PKCS + Public-Key Cryptography Standards + + + + + + PlanPerfect spreadsheet + + + + + Pocket Word document + + + + + + + + Profiler results + + + + + + Pathetic Writer document + + + + + Python bytecode + + + + + + + + QtiPlot document + + + + + + + + + + Quattro Pro spreadsheet + + + + + + + + + + + + + QuickTime playlist + + + + + + + + + + + + + + + Quicken document + + + + + RAR archive + RAR + Roshal ARchive + + + + + + + + + + DAR archive + DAR + Disk ARchive + + + + + + + + Alzip archive + + + + + + + + Rejected patch + + + + + + + RPM package + + + + + + + + + Source RPM package + + + + + + + Ruby script + + + + + + + + + + + + + + + + Markaby script + + + + + + Crystal source code + + + + + + + + + + + + Julia source code + + + + + + + + + + + + Rust source code + + + + + + + + + + + + + + SC/Xspread spreadsheet + + + + + + + Shell archive + + + + + Libtool shared library + + + + + + Shared library + + + + + + + + + + Shell script + + + + + + + + + + + + + + + + + + + + + Fish shell script + + + + + + + + + + + Nushell script + + + + + + + + + + + Shockwave Flash file + + + + + + + + + + + + + Shorten audio + + + + + + + + + Siag spreadsheet + + + + + Skencil document + + + + + + + + Stampede package + + + + SG-1000 ROM + + + + + + Master System ROM + + + + + + Game Gear ROM + + + + + + + Super NES ROM + + + + + + + StuffIt archive + + + + + + + + + + + StuffIt X archive + + + + + + + + + SubRip subtitles + + + + + + + + + + + + WebVTT subtitles + VTT + Video Text Tracks + + + + + + + + + SAMI subtitles + SAMI + Synchronized Accessible Media Interchange + + + + + + + + + + MicroDVD subtitles + + + + + + + + + + MPL2 subtitles + + + + + + + + + + MPlayer subtitles + + + + + + + + SSA subtitles + SSA + SubStation Alpha + + + + + + + + + + OpenSSH public key + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OpenSSH private key + + + + + + + SubViewer subtitles + + + + + + + + iMelody ringtone + + + + + + + + + + + SMAF audio + SMAF + Synthetic music Mobile Application Format + + + + + + + + + + MRML playlist + MRML + Multimedia Retrieval Markup Language + + + + + + + + + XMF audio + XMF + eXtensible Music Format + + + + + + + + Mobile XMF audio + XMF + eXtensible Music Format + + + + + + + + SV4 CPIO archive + + + + + SV4 CPIO archive (with CRC) + + + + + Tar archive + + + + + + + + + + + + Tar archive (compressed) + + + + + + + Generic font file + + + + + Packed font file + + + + + TGIF document + + + + + + + + Theme + + + + + + ToutDoux document + + + + Backup file + + + + + + + + Troff document + + + + + + + + + + + + + + + Manual page + + + + + + + Manual page (compressed) + + + + Tar archive (LZO-compressed) + + + + + + + XZ archive + + + + + + + + Tar archive (XZ-compressed) + + + + + + + Zpaq Archive + + + + + + + + Zstandard archive + + + + + + + + Tar archive (Zstandard-compressed) + + + + + + + PDF document (XZ-compressed) + + + + + + Ustar archive + + + + + WAIS source code + + + + + + WordPerfect/Drawperfect image + + + + + Bandai WonderSwan ROM + + + + + Bandai WonderSwan Color ROM + + + + + DER/PEM/Netscape-encoded X.509 certificate + + + + + + + + + + + + Empty document + + + Zoo archive + + + + + + + + XHTML page + XHTML + Extensible HyperText Markup Language + + + + + + + + + + + + + + + + Zip archive + + + + + + + + + + + WIM disk image + WIM + Windows Imaging Format + + + + + + + + Dolby Digital audio + + + + + + + DTS audio + DTS + Digital Theater Systems + + + + + + + + + + + DTS-HD audio + DTS-HD + Digital Theater Systems High Definition + + + + + + + + + + + AMR audio + AMR + Adaptive Multi-Rate + + + + + + + + + AMR-WB audio + AMR-WB + Adaptive Multi-Rate Wideband + + + + + + + + + ULAW (Sun) audio + + + + + + + + Commodore 64 audio + + + + + + + + PCM audio + PCM + Pulse-code Modulation + + + + + + + + + + + + + + + + + + AIFC audio + AIFC + Audio Interchange File format Compressed + + + + + + + + + + AIFF/Amiga/Mac audio + AIFF + Audio Interchange File Format + + + + + + + + + + Monkey's audio + + + + + + + Audible.Com audio + + + + + + + + + Audible Enhanced audio + + + + + + + Audible Enhanced audio + + + + + + + DSDIFF audio + DSDIFF + Direct Stream Digital Interchange File Format + + + + + + + + + + + DSF audio + DSF + Direct stream digital Stream File + + + + + + + + + + + + + + + + Impulse Tracker audio + + + + + + + FLAC audio + FLAC + Free Lossless Audio Codec + + + + + + + + TAK audio + TAK + Tom's lossless Audio Kompressor + + + + + + + WavPack audio + + + + + + + + WavPack audio correction file + + + + + + + MIDI audio + MIDI + Musical Instrument Digital Interface + + + + + + + + + + Compressed Tracker audio + + + + + + + AAC audio + AAC + Advanced Audio Coding + + + + + + + + + + + USAC audio + USAC + Unified Speech and Audio Coding + + + + + MPEG-4 audio + + + + + + + + + + MPEG-4 ringtone + + + + + MPEG-4 video + + + + + + + + + + + + + + + + + + MPEG-4 audio book + + + + + + + + + 3GPP multimedia file + 3GPP + 3rd Generation Partnership Project + + + + + + + + + + + + + + + + + + + + + 3GPP2 multimedia file + 3GPP2 + 3rd Generation Partnership Project 2 + + + + + + + + + + Amiga SoundTracker audio + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MP2 audio + + + + + MP3 audio + + + + + + + + + + + + + + + + + + Media playlist + + + + + + + + + + + + + + + Media playlist + + + + + + + + + + + + Microsoft ASX playlist + + + + + + + + + + + + + + + + + PSF audio + PSF + Portable Sound Format + + + + + + + MiniPSF audio + MiniPSF + Miniature Portable Sound Format + + + + + PSFlib audio library + PSFlib + Portable Sound Format Library + + + + + Windows Media audio + + + + + + Musepack audio + + + + + + + + + + RealAudio document + + + + + + + RealMedia playlist + + + + RealVideo document + + + + + + RealMedia document + + + + + + + + + + + + + + Radiance HDR image + + + + + + + + + + RealPix document + + + + RealText document + + + + + RIFF audio + + + RIFF container + + + + + + + Scream Tracker 3 audio + + + + + + + MP3 ShoutCast playlist + + + + + + + + + + + Scream Tracker audio + + + + + + + + + VOC audio + + + + WAV audio + + + + + + + + + + + FastTracker II instrument + + + + + + + FastTracker II audio + + + + + + + TrueAudio audio + + + + + + + + Windows BMP image + + + + + + + + + + + + + + + WBMP image + WBMP + WAP bitmap + + + + CGM image + CGM + Computer Graphics Metafile + + + + CCITT G3 fax image + CCITT + Comité Consultatif International Téléphonique et Télégraphique + + + + + GIF image + GIF + Graphics Interchange Format + + + + + + + HEIF image + HEIF + High Efficiency Image File + + + + + + + + + + + + + + + + + JPEG 2000 image encapsulated in HEIF + + + + + + + AVC-encoded image encapsulated in HEIF + + + + + + + IEF image + + + + JPEG image + JPEG + Joint Photographic Experts Group + + + + + + + + + + + + MJPEG video stream + MJPEG + Motion JPEG + + + + + + JPEG-2000 codestream + + + + + + + + + JPEG-2000 JP2 image + JP2 + JPEG-2000 + + + + + + + + + + + JPEG-2000 JPX image + JPX + JPEG-2000 eXtended + + + + + + + + JPEG-2000 JPM image + JPM + JPEG-2000 Mixed + + + + + + + + JPEG-2000 MJ2 video + MJ2 + Motion JPEG-2000 + + + + + + + + JPEG XL image + + + + + + + + OpenRaster image + + + + + + + + + + + + DirectDraw surface + + + + + + + X11 cursor + + + + + + EXR image + + + + + + + Macintosh Quickdraw/PICT drawing + + + + + + + + + + + + + + + + + + + + + + + + + UFRaw ID image + UFRaw + Unidentified Flying Raw + + + + + + Digital raw image + + + Adobe DNG negative + DNG + Digital Negative + + + + + + + + Canon CRW raw image + CRW + Canon RaW + + + + + + + + + Canon CR2 raw image + CR2 + Canon Raw 2 + + + + + + Canon CR3 raw image + CR3 + Canon Raw 3 + + + + + Fuji RAF raw image + RAF + RAw Format + + + + + + + + Kodak DCR raw image + DCR + Digital Camera Raw + + + + + + Kodak K25 raw image + K25 + Kodak DC25 + + + + + + Kodak KDC raw image + KDC + Kodak Digital Camera + + + + + + + + + Minolta MRW raw image + MRW + Minolta RaW + + + + + + + + Nikon NEF raw image + NEF + Nikon Electronic Format + + + + + + Nikon NRW raw image + + + + + + Olympus ORF raw image + ORF + Olympus Raw Format + + + + + + + + + + + + + Panasonic raw image + + + + + + + + + + Panasonic raw image + + + + + + + + + + Pentax PEF raw image + PEF + Pentax Electronic Format + + + + + + Sigma X3F raw image + X3F + X3 Foveon + + + + + + + + + + + + Sony SRF raw image + SRF + Sony Raw Format + + + + + + Sony SR2 raw image + SR2 + Sony Raw format 2 + + + + + + Sony ARW raw image + ARW + Alpha Raw format + + + + + + BroadBand eBook + + + + + + + + PNG image + PNG + Portable Network Graphics + + + + + + + Animated PNG image + PNG + Portable Network Graphics + + + + + + + + + + + + RLE bitmap image + RLE + Run Length Encoded + + + + SVG image + SVG + Scalable Vector Graphics + + + + + + + + + + + + + + Compressed SVG image + SVG + Scalable Vector Graphics + + + + + + TIFF image + TIFF + Tagged Image File Format + + + + + + + + + Multi-page TIFF image + TIFF + Tagged Image File Format + + + + AutoCAD image + + + + DXF vector image + + + + + + + + MDI image + MDI + Microsoft Document Imaging + + + + + + + JPEG XR image + XR + Extended Range + + + + + + + + + + WebP image + + + + + + + + + 3D Studio image + + + + + + + Applix Graphics image + + + + + + + + + EPS image (bzip2-compressed) + + + + + + + CMU raster image + + + + Compressed GIMP image + + + + + DICOM image + DICOM + Digital Imaging and Communications in Medicine + + + + + + + + + DocBook document + + + + + + + + + + + + + + + DIB image + DIB + Device Independent Bitmap + + + + + + DjVu image + + + + + + + + + + + + + + + DjVu document + + + + + + + + + + + + + + + DPX image + DPX + Digital Moving Picture Exchange + + + + + + EPS image + EPS + Encapsulated PostScript + + + + + + + + + + + + + + + + FITS document + FITS + Flexible Image Transport System + + + + + + + + + + + FlashPix image + + + + + + + + + + + EPS image (gzip-compressed) + + + + + + + Windows icon + + + + + + + + + + + + + + + MacOS X icon + + + + + + + ILBM image + ILBM + InterLeaved BitMap + + + + + + + + + + + + JNG image + JNG + JPEG Network Graphics + + + + LightWave object + + + + + LightWave scene + + + + MacPaint Bitmap image + + + + Office drawing + + + + NIFF image + NIFF + Navy Image File Format + + + + + + PCX image + PCX + PiCture eXchange + + + + + + + + + + + + + PCD image + PCD + PhotoCD + + + + + PNM image + PNM + Portable Anymap + + + + PBM image + PBM + Portable BitMap + + + + + + + + + + + + + + + + + + + PGM image + PGM + Portable GrayMap + + + + + + + + + + + + + + + + + + + PPM image + PPM + Portable PixMap + + + + + + + + + + + + + + + + + + + Photoshop image + + + + + + + + + + + + + RGB image + + + + SGI image + + + + Sun raster image + + + + + + + TGA image + TGA + Truevision Graphics Adapter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Windows cursor + + + + + + + + + Windows animated cursor + + + + + + + + + EMF image + EMF + Enhanced MetaFile + + + + + + + + + + + + + + + + WMF image + WMF + Windows Metafile + + + + + + + + + + + + + + + + + + + + + + XBM image + XBM + X BitMap + + + + GIMP image + + + + + + + + GIMP brush + + + + + + + GIMP brush pipe + + + + GIMP pattern + + + + + + + XFig image + + + + + + + XPM image + XPM + X PixMap + + + + + + + + + X window image + + + + KiSS cel + KiSS + Kisekae Set System + + + + + + + + Block device + + + Character device + + + Folder + + + + + Pipe + + + Mount point + + + + Socket + + + Symbolic link + + + Mail delivery report + + + + + Mail disposition report + + + + + Reference to remote file + + + + Usenet news message + + + + + + + + + + Partial email message + + + + + Email message + + + + + + + + + + + + + + + + + + + + GNU mail message + + + + + IGES document + IGES + Initial Graphics Exchange Specification + + + + + + + + + + + glTF model + glTF + GL Transmission Format + + + + + + + + glTF model + glTF + GL Transmission Format + + + + + + VRML document + VRML + Virtual Reality Modeling Language + + + + + + + + + + + OBJ 3D model + + + + + + + + + + + OBJ 3D model material library + + + + + + + + + + Message in several formats + + + Macintosh AppleDouble-encoded file + + + Message digest + + + Encrypted message + + + Compound documents + + + Compound document + + + Mail system report + + + Signed message + + + Stream of data (server push) + + + VCS/ICS calendar + VCS/ICS + vCalendar/iCalendar + + + + + + + + + + + + + + + CSS stylesheet + CSS + Cascading Style Sheets + + + + + Electronic business card + + + + + + + + + + + + + + Turtle document + + + + + txt2tags document + + + + + + + + + Verilog source code + + + + + + + + + + SystemVerilog header + + + + + SystemVerilog source code + + + + + VHDL source code + VHDL + Very-High-Speed Integrated Circuit Hardware Description Language + + + + + + Enriched text document + + + + Plain text document + + + + + + + + + + RDF file + RDF + Resource Description Framework + + + + + + + + + ReStructuredText document + + + + + OWL XML file + OWL + Web Ontology Language + + + + + + + + + Email headers + + + + Rich text document + + + + + RSS summary + RSS + RDF Site Summary + + + + + + + + + + + Atom syndication feed + + + + + + + + + + OPML syndication feed + OPML + Outline Processor Markup Language + + + + + + + + + + SGML document + SGML + Standard Generalized Markup Language + + + + + + Spreadsheet interchange document + + + + + + + + + + + TSV document + TSV + Tab Separated Values + + + + + Graphviz DOT graph + + + + + + + + + + + + + JAD document + JAD + Java Application Descriptor + + + + + + + + WML document + WML + Wireless Markup Language + + + + + WMLScript program + + + + + WarpScript source code + + + + + + + + + + ACE archive + + + + + + + + Ada source code + + + + + + Author list + + + + + BibTeX document + + + + + + + + Blueprint source code + + + + + + + + + + C++ header + + + + + + + + + C++ source code + + + + + + + + + ChangeLog document + + + + + C header + + + + + CMake source code + + + + + + Common Lisp source code + + + + + + + + CSV document + CSV + Comma Separated Values + + + + + + + CSV Schema document + CSV + Comma Separated Values + + + + + License terms + + + + + Author credits + + + + + C source code + + + + + + + Docker container build file + + + + + + + + + + + + + Assembly code + + + + + + + + + + + + + + + C# source code + + + + + + + + + + + + + + Vala source code + + + + + + + + + + + + + + + OOC source code + OOC + Out Of Class + + + + + + + + + DCL script + DCL + Data Conversion Laboratory + + + + + DSSSL document + DSSSL + Document Style Semantics and Specification Language + + + + + D source code + + + + + + + + + + + + + + DTD file + DTD + Document Type Definition + + + + + + + Eiffel source code + + + + + + + + + Emacs Lisp source code + + + + + + + + + Elixir source code + + + + + + + + + Erlang source code + + + + + Fortran source code + + + + + + + + Genie source code + + + + + + + + + + + + + + + + Translation file + + + + + + + Translation template + + + + + + + + + Gherkin document + + + + + HTML document + HTML + HyperText Markup Language + + + + + + + + + + + + + + + + + + + + + + + + + + + Windows HTML desktop application + HTML + HyperText Markup Language + + + + + + + + + + HTML component + HTML + HyperText Markup Language + + + + + + + Web application cache file + + + + + + + + + + + + + Google Video Pointer shortcut + + + + + + + + + + Haskell source code + + + + + IDL document + IDL + Interface Definition Language + + + + + Installation instructions + + + + + Java source code + + + + + + + + + + + + + LDIF address book + LDIF + LDAP Data Interchange Format + + + + + + + + + + Lilypond music sheet + + + + + LHS source code + LHS + Literate Haskell source code + + + + + Application log + + + + + Makefile build file + + + + + + + + + + + + + Markdown document + + + + + + + + + Qt MOC file + Qt MOC + Qt Meta Object Compiler + + + + + Windows Registry extract + + + + + + + + + + MOF file + MOF + Windows Managed Object File + + + + + Mup musical composition document + + + + + + + + + Nix source code + + + + + Objective-C source code + + + + + Objective-C++ source code + + + + + + + + + + + + + + + + OCaml source code + + + + + + + + + + + + + OpenCL source code + OpenCL + Open Computing Language + + + + + + + + + + + MATLAB file + + + + + + + + + + Meson source code + + + + + + Modelica model + + + + + + + + + + + + Pascal source code + + + + + + Differences between files + + + + + + + + + + + + + + + + + + + Dart source code + + + + + + + + + + + + Nim source code + + + + + + + + + Nimscript source code + + + + + + Go source code + + + + + + + + + + + + + SCons configuration file + + + + + + + Python 3 script + + + + + + + + + + + + + + + + + + + Python 2 script + + + + + + + + + + + + + + + + + + Python script + + + + + + + + + + + + + + + + + + + Cython source code + + + + + + + + + + + + + SageMath script + + + + + Lua script + + + + + + + + + + + + + + + README document + + + + + NFO document + + + + + Todo.txt file + + + + + + + + + RPM spec file + RPM + Red Hat Package Manager + + + + + + + + + Sass CSS pre-processor file + Sass + Syntactically Awesome Style Sheets + + + + + + Scala source code + + + + + + + + + + + + Scheme source code + + + + + + SCSS pre-processor file + SCSS + Sassy CSS + + + + + + Setext document + + + + + SQL code + + + + + + Tcl script + + + + + + + TeX document + + + + + + + + + + + + + + + + + + TeXInfo document + + + + + + Typst document + + + + + + Troff ME input document + + + + + Troff MM input document + + + + + Troff MS input document + + + + + Twig template + + + + + + X-Motif UIL table + + + + + Resource location + + + + + uuencoded file + + + + + + + + + BASIC program + + + + + + Visual Basic .NET source code + + + + + + + + + + VBScript program + + + + + + + Encoded VBScript program + + + + + + + + + + XMI file + XMI + XML Metadata Interchange + + + + + + + XSL FO file + XSL FO + XSL Formatting Objects + + + + + + + iptables configuration file + + + + + + + + + + + + + + + + + + + + + + + + + D-Bus service file + + + + + + + + + Systemd unit file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XSLT stylesheet + XSLT + eXtensible Stylesheet Language Transformation + + + + + + + + + + + Maven description file + + + + + + + XMCD CD database + + + + + + + XML document + XML + eXtensible Markup Language + + + + + + + + + + + + + XML entities document + XML + eXtensible Markup Language + + + + + + + DV video + DV + Digital Video + + + + + + + ISI video + + + MPEG-2 transport stream + MPEG-2 TS + Moving Picture Experts Group 2 Transport Stream + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MPEG video + MPEG + Moving Picture Experts Group + + + + + + + + + + + + + + + + + + Video playlist + + + + + + + + + + + QuickTime video + + + + + + + + + + + + + QuickTime image + + + + + + + + Khronos texture image + + + + + + + + + + + Khronos texture image + + + + + + + + + + + ASTC texture + ASTC + Advanced Scalable Texture Compression + + + + + + + Vivo video + + + + + + Wavelet video + + + ANIM animation + + + + FLIC animation + + + + + + + + + + + Haansoft Hangul document + + + + + + + + + Haansoft Hangul document template + + + + + + MNG animation + MNG + Multiple-Image Network Graphics + + + + + + + ASF video + ASF + Advanced Streaming Format + + + + + + + + + + + Windows Media Station file + + + + + + + + + Windows Media video + + + + + AVI video + AVI + Audio Video Interleave + + + + + + + + + + + + + + + + + + + + NullSoft video + + + + + + + SDP multicast stream file + SDP + Session Description Protocol + + + + + + + + + + + + + SGI video + + + + + + + eMusic download package + + + + + + + + KML geographic data + KML + Keyhole Markup Language + + + + + + KML geographic compressed data + KML + Keyhole Markup Language + + + + + GeoJSON geospatial data + + + + + + + GPX geographic data + GPX + GPS Exchange Format + + + + + + + + + + Citrix ICA settings file + ICA + Independent Computing Architecture + + + + + + XUL interface document + XUL + XML User interface markup Language + + + + + + + XPInstall installer module + + + + + Word 2007 document + + + + + + Word 2007 document template + + + + + + PowerPoint 2007 presentation + + + + + + PowerPoint 2007 slide + + + + + + PowerPoint 2007 show + + + + + + PowerPoint 2007 presentation template + + + + + + Excel 2007 spreadsheet + + + + + + Excel 2007 spreadsheet template + + + + + + Microsoft Office 2007 theme + + + + + + T602 document + + + + + + + + + + Cisco VPN settings + + + + + + + + + + + ICC profile + ICC + International Color Consortium + + + + + + + + IT 8.7 color calibration file + + + + + + + + + CCMX color correction file + + + + + + + + + WinHelp help file + + + + + + + + Binary differences between files + + + + + + + + + + + Digital photos + + + + + + + + Video CD + + + + + + + + Super Video CD + + + + + + + + Video DVD + + + + + + + + + + + Audio CD + + + + + Blank CD disc + + + + + Blank DVD disc + + + + + Blank Blu-ray disc + + + + + Blank HD DVD disc + + + + + Audio DVD + + + + + + + + + Blu-ray video disc + + + + + + + + + HD DVD video disc + + + + + + + + + + E-book reader + + + + + + + + + Picture CD + + + + + + + + Portable audio player + + + + + OSTree software updates + + + + + + + + + + Software + + + + + UNIX software + + + + + + + + + + + Windows software + + + + + + + + + TriG RDF document + TriG + TriG RDF Graph Triple Language + + + + + + + Apple Keynote 5 presentation + + + + + + + + + + + + Apple Numbers spreadsheet + + + + + + + + + + + + + Apple Pages document + + + + + + + + + + + + + Apple Wallet pass + + + + + + + + + + Apple Wallet passes bundle + + + + + + + + + + + Adobe PageMaker document + + + + + + + + + + Doom WAD file + WAD + Where's All the Data + + + + + + + + + + Amiga disk image + + + + + + + + Flatpak application bundle + + + + + + + + + + + + Flatpak repository description + + + + + + + + + + Flatpak repository reference + + + + + + + + + + Squashfs filesystem image + + + + + + + + + + + + + AppImage application bundle + + + + + + + + + + + + + + + + Snap package + + + + + + + 3MF document + 3MF + 3D Manufacturing Format + + + + + + + + STL 3D model + STL + StereoLithography + + + + + + + + + + + + STEP 3D model + + + + + + + + + + G-code file + + + + + + + G-code Extended file + + + + + + + + Nintendo FDS disk image + FDS + Famicom Disk System + + + + + + + + OVF disk image + OVF + Open Virtualization Format + + + + + + + + + + + + QEMU QED disk image + QED + QEMU Enhanced Disk + + + + + + + QEMU QCOW disk image + QCOW + QEMU Copy On Write + + + + + + + + + + VHD disk image + VHD + Virtual Hard Disk + + + + + + + + + VHDX disk image + VHDX + Virtual Hard Disk v2 + + + + + + + + VMDK disk image + VMDK + Virtual Machine Disk + + + + + + + + + VDI disk image + VDI + Virtual Disk Image + + + + + + + + + + + + + + AppleWorks document + + + + + + BPS patch + BPS + Binary Patching System + + + + + + + + IPS patch + IPS + International Patching System + + + + + + + + Pyspread spreadsheet + + + + + + + + Pyspread spreadsheet (bzip2-compressed) + + + + + + + Kotlin source code + + + + + + + + + + + + + + + + Devicetree source code + DTS + Device Tree Source + + + + + + + + + + + + + + + + + + + + + + + + + Flattened Devicetree + DTB + Device Tree Binary + + + + + + + + AVIF image + AVIF + AV1 Image File Format + + + + + + + + + + + + + + + + Quite OK Image Format + + + + + + + + Bink Video + + + + + + + + + + + + + + + + + + + + + + + + Smacker Video + + + + + + + + + + Org-mode file + + + + + OpenZIM file + ZIM + Zeno IMproved + + + + + + + SPARQL query + SPARQL + SPARQL Protocol and RDF Query Language + + + + + + + SPARQL query results + SPARQL + SPARQL Protocol and RDF Query Language + + + + + + WASM binary module + WASM + Web Assembly + + + + + + + OpenVPN profile + + + + + + + Modrinth Modpack + + + + + + QBrew beer recipes + + + + + CBOR Data + CBOR + Concise Binary Object Representation + + + + ERIS Link + ERIS + Encoding for Robust Immutable Storage + + + + + + + + Gerber file + + + + + + + + + + + + + + + + + + + Gerber job file + + + + + + Excellon drill file + + + + + + + + + + Tiled map files + + + + + Tiled tileset files + + + + + + Scitex CT + CT + Continuous Tone + + + + + + + + Pixar raster + + + + + + + + Portable FloatMap + + + + + + + + + Portable HalfMap + + + + + + + + + Proxy Auto-Configuration file + + + + + + + + diff --git a/resources/config/freedesktop.org.xml.license b/resources/config/freedesktop.org.xml.license new file mode 100644 index 0000000000000..a1d53f9e8e4d9 --- /dev/null +++ b/resources/config/freedesktop.org.xml.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: Cross-desktop interoperability standards - freedesktop.org +SPDX-License-Identifier: GPL-2.0-only \ No newline at end of file diff --git a/resources/config/mimetypenames-update.sh b/resources/config/mimetypenames-update.sh new file mode 100755 index 0000000000000..c64d961136f1e --- /dev/null +++ b/resources/config/mimetypenames-update.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later + +set -e + +# Paths +MIME_JSON="mimetypemapping.dist.json" +XML_FILE="freedesktop.org.xml" +OUTPUT_JSON="mimetypenames.dist.json" + +echo "1/ Extracting MIME types from $MIME_JSON" + +# Extract all unique MIME types (excluding _comment keys) +MIME_TYPES=$(jq -r 'with_entries(select(.key | startswith("_") | not)) | to_entries | map(.value[]) | unique | .[]' "$MIME_JSON") + +echo "Found $(echo "$MIME_TYPES" | wc -l) unique MIME types" + +echo "2/ Downloading freedesktop.org XML file" +curl -sSL "https://gitlab.freedesktop.org/xdg/shared-mime-info/-/raw/03cb97596e90feda547c9b6a2addd656b14d1598/data/freedesktop.org.xml.in" > "$XML_FILE" +echo "Downloaded XML file to $XML_FILE" + +echo "3/ Creating or updating MIME name mapping" + +# Start from existing output if it exists, or create an empty one +if [ -f "$OUTPUT_JSON" ]; then + cp "$OUTPUT_JSON" "$OUTPUT_JSON.tmp" +else + echo "{}" > "$OUTPUT_JSON.tmp" +fi + +# Track stats +MATCHED_COUNT=0 +MISSING_COUNT=0 + +# Process each MIME type +while read -r MIME; do + echo "Processing: $MIME" + + # Extract comment with XML namespace handling + COMMENT=$(xmlstarlet sel -N x="http://www.freedesktop.org/standards/shared-mime-info" \ + -t -m "//x:mime-type[@type='${MIME}']" -v "x:comment" -n "$XML_FILE" | head -n 1) + + if [ -n "$COMMENT" ]; then + ESCAPED_COMMENT=$(echo "$COMMENT" | sed 's/"/\\"/g') + jq --arg key "$MIME" --arg value "$ESCAPED_COMMENT" '. + {($key): $value}' "$OUTPUT_JSON.tmp" > "$OUTPUT_JSON.tmp2" && mv "$OUTPUT_JSON.tmp2" "$OUTPUT_JSON.tmp" + MATCHED_COUNT=$((MATCHED_COUNT + 1)) + else + echo " > Warning: No description found for MIME type $MIME ⚠️" + MISSING_COUNT=$((MISSING_COUNT + 1)) + fi +done <<< "$MIME_TYPES" + +# Final formatting and sorting by keys +jq -S . "$OUTPUT_JSON.tmp" > "$OUTPUT_JSON" && rm "$OUTPUT_JSON.tmp" + +echo "✅ Done!" +echo "✔️ Descriptions found for $MATCHED_COUNT MIME types" +echo "⚠️ Descriptions missing for $MISSING_COUNT MIME types" +echo "📄 Output written to $OUTPUT_JSON" diff --git a/resources/config/mimetypenames.dist.json b/resources/config/mimetypenames.dist.json new file mode 100644 index 0000000000000..29d9d6828d3aa --- /dev/null +++ b/resources/config/mimetypenames.dist.json @@ -0,0 +1,112 @@ +{ + "_comment": "Array of human readable mimes.", + "_comment2": "Any changes you make here will be overwritten on an update of Nextcloud.", + "_comment3": "Put any custom mappings in a new file mimetypenames.json in the config/ folder of Nextcloud", + "_comment4": "After any change to mimetypenames.json run:", + "_comment5": "./occ maintenance:mimetype:update-js", + "_comment6": "Otherwise your update won't propagate through the system.", + "application/epub+zip": "Electronic book document", + "application/gpx+xml": "GPX geographic data", + "application/gzip": "Gzip archive", + "application/illustrator": "Adobe Illustrator document", + "application/json": "JSON document", + "application/msword": "Word document", + "application/octet-stream": "Unknown", + "application/pdf": "PDF document", + "application/postscript": "PostScript document", + "application/rss+xml": "RSS summary", + "application/vnd.android.package-archive": "Android package", + "application/vnd.google-earth.kml+xml": "KML geographic data", + "application/vnd.google-earth.kmz": "KML geographic compressed data", + "application/vnd.lotus-wordpro": "Lotus Word Pro document", + "application/vnd.ms-excel": "Excel spreadsheet", + "application/vnd.ms-excel.addin.macroEnabled.12": "Excel add-in", + "application/vnd.ms-excel.sheet.binary.macroEnabled.12": "Excel 2007 binary spreadsheet", + "application/vnd.ms-excel.sheet.macroEnabled.12": "Excel spreadsheet", + "application/vnd.ms-excel.template.macroEnabled.12": "Excel spreadsheet template", + "application/vnd.ms-powerpoint": "PowerPoint presentation", + "application/vnd.ms-powerpoint.addin.macroEnabled.12": "PowerPoint add-in", + "application/vnd.ms-powerpoint.presentation.macroEnabled.12": "PowerPoint presentation", + "application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "PowerPoint presentation", + "application/vnd.ms-powerpoint.template.macroEnabled.12": "PowerPoint presentation template", + "application/vnd.ms-word.document.macroEnabled.12": "Word document", + "application/vnd.oasis.opendocument.formula": "ODF formula", + "application/vnd.oasis.opendocument.graphics": "ODG drawing", + "application/vnd.oasis.opendocument.graphics-flat-xml": "ODG drawing (Flat XML)", + "application/vnd.oasis.opendocument.graphics-template": "ODG template", + "application/vnd.oasis.opendocument.presentation": "ODP presentation", + "application/vnd.oasis.opendocument.presentation-flat-xml": "ODP presentation (Flat XML)", + "application/vnd.oasis.opendocument.presentation-template": "ODP template", + "application/vnd.oasis.opendocument.spreadsheet": "ODS spreadsheet", + "application/vnd.oasis.opendocument.spreadsheet-flat-xml": "ODS spreadsheet (Flat XML)", + "application/vnd.oasis.opendocument.spreadsheet-template": "ODS template", + "application/vnd.oasis.opendocument.text": "ODT document", + "application/vnd.oasis.opendocument.text-flat-xml": "ODT document (Flat XML)", + "application/vnd.oasis.opendocument.text-template": "ODT template", + "application/vnd.openxmlformats-officedocument.presentationml.presentation": "PowerPoint 2007 presentation", + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PowerPoint 2007 show", + "application/vnd.openxmlformats-officedocument.presentationml.template": "PowerPoint 2007 presentation template", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "Excel 2007 spreadsheet", + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": "Excel 2007 spreadsheet template", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "Word 2007 document", + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": "Word 2007 document template", + "application/vnd.visio": "Microsoft Visio document", + "application/vnd.wordperfect": "WordPerfect document", + "application/x-7z-compressed": "7-zip archive", + "application/x-blender": "Blender scene", + "application/x-bzip2": "Bzip2 archive", + "application/x-fictionbook+xml": "FictionBook document", + "application/x-krita": "Krita document", + "application/x-mobipocket-ebook": "Mobipocket e-book", + "application/x-msi": "Windows Installer package", + "application/x-perl": "Perl script", + "application/x-php": "PHP script", + "application/x-tar": "Tar archive", + "application/xml": "XML document", + "application/yaml": "YAML document", + "application/zip": "Zip archive", + "application/zstd": "Zstandard archive", + "audio/aac": "AAC audio", + "audio/flac": "FLAC audio", + "audio/mp4": "MPEG-4 audio", + "audio/mpeg": "MP3 audio", + "audio/ogg": "Ogg audio", + "audio/webm": "WebM audio", + "audio/x-scpls": "MP3 ShoutCast playlist", + "image/bmp": "Windows BMP image", + "image/emf": "EMF image", + "image/gif": "GIF image", + "image/heif": "HEIF image", + "image/jp2": "JPEG-2000 JP2 image", + "image/jpeg": "JPEG image", + "image/png": "PNG image", + "image/svg+xml": "SVG image", + "image/tiff": "TIFF image", + "image/webp": "WebP image", + "image/x-dcraw": "Digital raw image", + "message/rfc822": "Email message", + "text/calendar": "VCS/ICS calendar", + "text/css": "CSS stylesheet", + "text/csv": "CSV document", + "text/html": "HTML document", + "text/markdown": "Markdown document", + "text/org": "Org-mode file", + "text/plain": "Plain text document", + "text/vcard": "Electronic business card", + "text/x-c++src": "C++ source code", + "text/x-ldif": "LDIF address book", + "text/x-nfo": "NFO document", + "text/x-python": "Python script", + "text/x-rst": "ReStructuredText document", + "video/3gpp": "3GPP multimedia file", + "video/dv": "DV video", + "video/mp2t": "MPEG-2 transport stream", + "video/mp4": "MPEG-4 video", + "video/mpeg": "MPEG video", + "video/ogg": "Ogg video", + "video/quicktime": "QuickTime video", + "video/webm": "WebM video", + "video/x-flv": "Flash video", + "video/x-matroska": "Matroska video", + "video/x-ms-wmv": "Windows Media video" +} diff --git a/resources/config/mimetypenames.dist.json.license b/resources/config/mimetypenames.dist.json.license new file mode 100644 index 0000000000000..a46df3694b6c7 --- /dev/null +++ b/resources/config/mimetypenames.dist.json.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +SPDX-License-Identifier: AGPL-3.0-only \ No newline at end of file diff --git a/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js b/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js index 2a33e82c21412..8d5c7702caa92 100644 --- a/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js +++ b/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js @@ -152,5 +152,111 @@ OC.MimeTypeList={ "x-office-presentation", "x-office-spreadsheet" ], - themes: [] + themes: [], + names: {'application/epub+zip': t('core', "Electronic book document"), +'application/gpx+xml': t('core', "GPX geographic data"), +'application/gzip': t('core', "Gzip archive"), +'application/illustrator': t('core', "Adobe Illustrator document"), +'application/json': t('core', "JSON document"), +'application/msword': t('core', "Word document"), +'application/octet-stream': t('core', "Unknown"), +'application/pdf': t('core', "PDF document"), +'application/postscript': t('core', "PostScript document"), +'application/rss+xml': t('core', "RSS summary"), +'application/vnd.android.package-archive': t('core', "Android package"), +'application/vnd.google-earth.kml+xml': t('core', "KML geographic data"), +'application/vnd.google-earth.kmz': t('core', "KML geographic compressed data"), +'application/vnd.lotus-wordpro': t('core', "Lotus Word Pro document"), +'application/vnd.ms-excel': t('core', "Excel spreadsheet"), +'application/vnd.ms-excel.addin.macroEnabled.12': t('core', "Excel add-in"), +'application/vnd.ms-excel.sheet.binary.macroEnabled.12': t('core', "Excel 2007 binary spreadsheet"), +'application/vnd.ms-excel.sheet.macroEnabled.12': t('core', "Excel spreadsheet"), +'application/vnd.ms-excel.template.macroEnabled.12': t('core', "Excel spreadsheet template"), +'application/vnd.ms-powerpoint': t('core', "PowerPoint presentation"), +'application/vnd.ms-powerpoint.addin.macroEnabled.12': t('core', "PowerPoint add-in"), +'application/vnd.ms-powerpoint.presentation.macroEnabled.12': t('core', "PowerPoint presentation"), +'application/vnd.ms-powerpoint.slideshow.macroEnabled.12': t('core', "PowerPoint presentation"), +'application/vnd.ms-powerpoint.template.macroEnabled.12': t('core', "PowerPoint presentation template"), +'application/vnd.ms-word.document.macroEnabled.12': t('core', "Word document"), +'application/vnd.oasis.opendocument.formula': t('core', "ODF formula"), +'application/vnd.oasis.opendocument.graphics': t('core', "ODG drawing"), +'application/vnd.oasis.opendocument.graphics-flat-xml': t('core', "ODG drawing (Flat XML)"), +'application/vnd.oasis.opendocument.graphics-template': t('core', "ODG template"), +'application/vnd.oasis.opendocument.presentation': t('core', "ODP presentation"), +'application/vnd.oasis.opendocument.presentation-flat-xml': t('core', "ODP presentation (Flat XML)"), +'application/vnd.oasis.opendocument.presentation-template': t('core', "ODP template"), +'application/vnd.oasis.opendocument.spreadsheet': t('core', "ODS spreadsheet"), +'application/vnd.oasis.opendocument.spreadsheet-flat-xml': t('core', "ODS spreadsheet (Flat XML)"), +'application/vnd.oasis.opendocument.spreadsheet-template': t('core', "ODS template"), +'application/vnd.oasis.opendocument.text': t('core', "ODT document"), +'application/vnd.oasis.opendocument.text-flat-xml': t('core', "ODT document (Flat XML)"), +'application/vnd.oasis.opendocument.text-template': t('core', "ODT template"), +'application/vnd.openxmlformats-officedocument.presentationml.presentation': t('core', "PowerPoint 2007 presentation"), +'application/vnd.openxmlformats-officedocument.presentationml.slideshow': t('core', "PowerPoint 2007 show"), +'application/vnd.openxmlformats-officedocument.presentationml.template': t('core', "PowerPoint 2007 presentation template"), +'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': t('core', "Excel 2007 spreadsheet"), +'application/vnd.openxmlformats-officedocument.spreadsheetml.template': t('core', "Excel 2007 spreadsheet template"), +'application/vnd.openxmlformats-officedocument.wordprocessingml.document': t('core', "Word 2007 document"), +'application/vnd.openxmlformats-officedocument.wordprocessingml.template': t('core', "Word 2007 document template"), +'application/vnd.visio': t('core', "Microsoft Visio document"), +'application/vnd.wordperfect': t('core', "WordPerfect document"), +'application/x-7z-compressed': t('core', "7-zip archive"), +'application/x-blender': t('core', "Blender scene"), +'application/x-bzip2': t('core', "Bzip2 archive"), +'application/x-fictionbook+xml': t('core', "FictionBook document"), +'application/x-krita': t('core', "Krita document"), +'application/x-mobipocket-ebook': t('core', "Mobipocket e-book"), +'application/x-msi': t('core', "Windows Installer package"), +'application/x-perl': t('core', "Perl script"), +'application/x-php': t('core', "PHP script"), +'application/x-tar': t('core', "Tar archive"), +'application/xml': t('core', "XML document"), +'application/yaml': t('core', "YAML document"), +'application/zip': t('core', "Zip archive"), +'application/zstd': t('core', "Zstandard archive"), +'audio/aac': t('core', "AAC audio"), +'audio/flac': t('core', "FLAC audio"), +'audio/mp4': t('core', "MPEG-4 audio"), +'audio/mpeg': t('core', "MP3 audio"), +'audio/ogg': t('core', "Ogg audio"), +'audio/webm': t('core', "WebM audio"), +'audio/x-scpls': t('core', "MP3 ShoutCast playlist"), +'image/bmp': t('core', "Windows BMP image"), +'image/emf': t('core', "EMF image"), +'image/gif': t('core', "GIF image"), +'image/heif': t('core', "HEIF image"), +'image/jp2': t('core', "JPEG-2000 JP2 image"), +'image/jpeg': t('core', "JPEG image"), +'image/png': t('core', "PNG image"), +'image/svg+xml': t('core', "SVG image"), +'image/tiff': t('core', "TIFF image"), +'image/webp': t('core', "WebP image"), +'image/x-dcraw': t('core', "Digital raw image"), +'message/rfc822': t('core', "Email message"), +'text/calendar': t('core', "VCS\/ICS calendar"), +'text/css': t('core', "CSS stylesheet"), +'text/csv': t('core', "CSV document"), +'text/html': t('core', "HTML document"), +'text/markdown': t('core', "Markdown document"), +'text/org': t('core', "Org-mode file"), +'text/plain': t('core', "Plain text document"), +'text/vcard': t('core', "Electronic business card"), +'text/x-c++src': t('core', "C++ source code"), +'text/x-ldif': t('core', "LDIF address book"), +'text/x-nfo': t('core', "NFO document"), +'text/x-python': t('core', "Python script"), +'text/x-rst': t('core', "ReStructuredText document"), +'video/3gpp': t('core', "3GPP multimedia file"), +'video/dv': t('core', "DV video"), +'video/mp2t': t('core', "MPEG-2 transport stream"), +'video/mp4': t('core', "MPEG-4 video"), +'video/mpeg': t('core', "MPEG video"), +'video/ogg': t('core', "Ogg video"), +'video/quicktime': t('core', "QuickTime video"), +'video/webm': t('core', "WebM video"), +'video/x-flv': t('core', "Flash video"), +'video/x-matroska': t('core', "Matroska video"), +'video/x-ms-wmv': t('core', "Windows Media video"), +'my-custom/mimetype': t('core', "Custom Document"), +}, }; diff --git a/tests/data/integritycheck/mimetypeListModified/core/signature.json b/tests/data/integritycheck/mimetypeListModified/core/signature.json index f4c5ee55857f8..cac26e900c507 100644 --- a/tests/data/integritycheck/mimetypeListModified/core/signature.json +++ b/tests/data/integritycheck/mimetypeListModified/core/signature.json @@ -1,7 +1,7 @@ { "hashes": { - "core\/js\/mimetypelist.js": "46f0174073339b822fc7d4a0f02bda57f211eb85b42995bd300232e77712ca05e14f6491f67c7b2da76d90b94fde8e16e01f5258a7586c2498d66247f81feaf8" + "core\/js\/mimetypelist.js": "1f672ccc11dd5f0cf8753461476b05fbf6fec018db00fc59b074947953ba99481103f84ace140255995278da7ef4e3b49d263cc29a4b29786fb19413083fe928" }, - "signature": "ZTndGos1JFlIVm38RMTuSWaD32D09kJ8yiin7zlXpF4NWJmcOca2WQQOtgnBxcawSS6Udhnu27gyYQDV9ZkDPcAQAc7oj0yBjNTgcABkhif3XKCJ+nJBMHWxdrItJ+dXplLNQSdwX0CeNfbkBbp6bLCBDmjG3FyxNdsbJEtlCAmA+PrxwsWUwsoZJR8MJVuIBQl\/nu+17a1Q6B9t8KBbbdN59FDv\/lTPYRp8YJSlfR6\/lPRPSk1Q9p\/vhjBE25wo6HfXYxb1LhnO6g78bcE\/MBuX3BhCbARImuwLOiOLl\/RUXePOgH\/M2sNpjETu4LOmludd4mgJJ78YygjPvCcp8BMHL\/s8q+2z1OSDj6W\/Qjw4iHAW0oigaaajjwFD1agjsVHYK9M0ypL8BH\/cDKQDFvMU6s\/+aDjUgqZDspqovbcmujtHWU\/bRY89OcOBJcLoGWcjUvpk6o12ONUtihOgt7OdtHL33ZUYu0MOgTmCPjE84xqiOPgfRV+sPUpBKwsPyYDPy4sIj53W4nJswIh+Z3R+DUv85LLwx0g1AZTT1gOxMNRILJrFSAHFpbEFeVOhOS\/9b1FiVs7XtShPNXWxArltVd2BjqLhhjPbgRuiALlUuBJN2UyxGlLoDcOm4bIymG1dUtNSWJRjMxKxdQjpuxuhspEaDmHWzq6htO+6elI=", + "signature": "V7eDZqrauafx5b\/taQ0Z2GYyuX6gjLU2\/igpQxs4o3YGG+ruBNk5PFoJxBbLogt5QrUIPilVJy3+2f4BkzWl7E2El51d2O+Ctg+cWATCvF6SJyhCdzZQLknyLXr4n+r7FlvHpiSQ8c88Aq2gNrBpK34Lq7YKjfln7q19vWIGUIYcE5gJJzhloSTF76\/yq3gIw48EXVrYMdT0nhE5zzk+pKJSvJCmtZGeyocXfHdRKGViH1egKvB8AJkTMByDbLKd9ZXhGrrQ1QWtJHLCDLrv6oBykz7N9J8yRbrKXjeuBtDAUfYHZeUbx7DYStNEWa3npXtst1HSJ7mMV5QYT9S9HbQp7qMQQBoze81QH3DS7jpksSkRr5w\/kE6FiNe8B8s56DMrNUo6NOFhsNRZF\/SNkVMgbRuckpCDHAE6hkz3+DwTQB7uYGu3qc965Yxn9YiGD83ep++c9CkEMOQL2q+CftbVMXVjF++Ml9P\/9N+ARF1t9mffEC8vOGaU1OR6DmPsbl1mlvkdP1RMKwa3Kp0nWEsWhDjjcB9b1hf4KCsPb6iiiyAV21qgigK73Aq\/8NRy0RlNB4rWsbb1NAV2tnnrJRbwdJrtS5dvTBADmsazt73jzkpc36vJNhBRaMUKTW05x7wnrw9K6MQDkjLuzfXJQWEJQtr+4dP9oyasamBufKc=", "certificate": "-----BEGIN CERTIFICATE-----\r\nMIIEvjCCAqagAwIBAgIUc\/0FxYrsgSs9rDxp03EJmbjN0NwwDQYJKoZIhvcNAQEF\r\nBQAwIzEhMB8GA1UECgwYb3duQ2xvdWQgQ29kZSBTaWduaW5nIENBMB4XDTE1MTEw\r\nMzIxMDMzM1oXDTE2MTEwMzIxMDMzM1owDzENMAsGA1UEAwwEY29yZTCCAiIwDQYJ\r\nKoZIhvcNAQEBBQADggIPADCCAgoCggIBALb6EgHpkAqZbO5vRO8XSh7G7XGWHw5s\r\niOf4RwPXR6SE9bWZEm\/b72SfWk\/\/J6AbrD8WiOzBuT\/ODy6k5T1arEdHO+Pux0W1\r\nMxYJJI4kH74KKgMpC0SB0Rt+8WrMqV1r3hhJ46df6Xr\/xolP3oD+eLbShPcblhdS\r\nVtkZEkoev8Sh6L2wDCeHDyPxzvj1w2dTdGVO9Kztn0xIlyfEBakqvBWtcxyi3Ln0\r\nklnxlMx3tPDUE4kqvpia9qNiB1AN2PV93eNr5\/2riAzIssMFSCarWCx0AKYb54+d\r\nxLpcYFyqPJ0ydBCkF78DD45RCZet6PNYkdzgbqlUWEGGomkuDoJbBg4wzgzO0D77\r\nH87KFhYW8tKFFvF1V3AHl\/sFQ9tDHaxM9Y0pZ2jPp\/ccdiqnmdkBxBDqsiRvHvVB\r\nCn6qpb4vWGFC7vHOBfYspmEL1zLlKXZv3ezMZEZw7O9ZvUP3VO\/wAtd2vUW8UFiq\r\ns2v1QnNLN6jNh51obcwmrBvWhJy9vQIdtIjQbDxqWTHh1zUSrw9wrlklCBZ\/zrM0\r\ni8nfCFwTxWRxp3H9KoECzO\/zS5R5KIS7s3\/wq\/w9T2Ie4rcecgXwDizwnn0C\/aKc\r\nbDIjujpL1s9HO05pcD\/V3wKcPZ1izymBkmMyIbL52iRVN5FTVHeZdXPpFuq+CTQJ\r\nQ238lC+A\/KOVAgMBAAEwDQYJKoZIhvcNAQEFBQADggIBAGoKTnh8RfJV4sQItVC2\r\nAvfJagkrIqZ3iiQTUBQGTKBsTnAqE1H7QgUSV9vSd+8rgvHkyZsRjmtyR1e3A6Ji\r\noNCXUbExC\/0iCPUqdHZIVb+Lc\/vWuv4ByFMybGPydgtLoEUX2ZrKFWmcgZFDUSRd\r\n9Uj26vtUhCC4bU4jgu6hIrR9IuxOBLQUxGTRZyAcXvj7obqRAEZwFAKQgFpfpqTb\r\nH+kjcbZSaAlLVSF7vBc1syyI8RGYbqpwvtREqJtl5IEIwe6huEqJ3zPnlP2th\/55\r\ncf3Fovj6JJgbb9XFxrdnsOsDOu\/tpnaRWlvv5ib4+SzG5wWFT5UUEo4Wg2STQiiX\r\nuVSRQxK1LE1yg84bs3NZk9FSQh4B8vZVuRr5FaJsZZkwlFlhRO\/\/+TJtXRbyNgsf\r\noMRZGi8DLGU2SGEAHcRH\/QZHq\/XDUWVzdxrSBYcy7GSpT7UDVzGv1rEJUrn5veP1\r\n0KmauAqtiIaYRm4f6YBsn0INcZxzIPZ0p8qFtVZBPeHhvQtvOt0iXI\/XUxEWOa2F\r\nK2EqhErgMK\/N07U1JJJay5tYZRtvkGq46oP\/5kQG8hYST0MDK6VihJoPpvCmAm4E\r\npEYKQ96x6A4EH9Y9mZlYozH\/eqmxPbTK8n89\/p7Ydun4rI+B2iiLnY8REWWy6+UQ\r\nV204fGUkJqW5CrKy3P3XvY9X\r\n-----END CERTIFICATE-----" } \ No newline at end of file diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index c5a4f255397e6..8414a5314643e 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -713,7 +713,9 @@ public function testVerifyCoreSignatureWithValidModifiedHtaccessSignatureData(): */ public function testVerifyCoreSignatureWithModifiedMimetypelistSignatureData(): void { $shippedMimetypeAliases = (array)json_decode(file_get_contents(\OC::$SERVERROOT . '/resources/config/mimetypealiases.dist.json')); + $shippedMimetypeNames = (array)json_decode(file_get_contents(\OC::$SERVERROOT . '/resources/config/mimetypenames.dist.json')); $allAliases = array_merge($shippedMimetypeAliases, ['my-custom/mimetype' => 'custom']); + $allMimetypeNames = array_merge($shippedMimetypeNames, ['my-custom/mimetype' => 'Custom Document']); $this->mimeTypeDetector ->method('getOnlyDefaultAliases') @@ -723,9 +725,14 @@ public function testVerifyCoreSignatureWithModifiedMimetypelistSignatureData(): ->method('getAllAliases') ->willReturn($allAliases); + $this->mimeTypeDetector + ->method('getAllNamings') + ->willReturn($allMimetypeNames); + $oldMimetypeList = new GenerateMimetypeFileBuilder(); $all = $this->mimeTypeDetector->getAllAliases(); - $newFile = $oldMimetypeList->generateFile($all); + $namings = $this->mimeTypeDetector->getAllNamings(); + $newFile = $oldMimetypeList->generateFile($all, $namings); // When updating the mimetype list the test assets need to be updated as well // 1. Update core/js/mimetypelist.js with the new generated js by running the test with the next line uncommented: