WP Manifestindependent plugin directory
manifest / media / docutheques

DocuThèques WP Registry grade D+. High-severity findings · 2 findingsWP RegistryHigh-severity findings · 2 findingsOpen the reportD+

An alternative & document oriented organization for your WordPress media

★ 3stars
124release downloads
≈100active sites
1.0.1latest · 5 years ago

Install

Download docutheques.zip From the 1.0.1 release on GitHub, Apr 26, 2021

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/imath/docutheques/releases/download/1.0.1/docutheques.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Screenshot

English

Version Française

An alternative & document oriented organization for your WordPress media.

Description

Thanks to DocuThèques, you can enjoy an alternative organization for your WordPress media. This plugin was inspired by the file exploration features of the softwares included into the computer operating systems and it lets you create folder trees to organize your media like documents.

DocuThèques adds a new interface to your WordPress administration from which you can create one or more DocuThèques for your site, attach folders to it, upload documents to it or organize the existing media of your WordPress site.

To help you do your first steps, this interface comes with an integrated user guide so that you can familiarize yourself with how you can create, update and delete your DocuThèques, your folders and your documents.

Each document in your DocuThèques has a unique and permanent download link, no matter its position in the tree structure of your DocuThèques. You can safely update the file associated with your documents, change the name of each of the folders that compose their tree structure: visitors or site members will always find the latest version of your document using their unique and unchanging download link.

Docuthèques is also tracking the number of document downloads made by your visitors or site members.

To make a DocuThèque available to them, simply create or update a WordPress page to insert it using the DocuThèques block. Note that you can insert one and only one DocuThèque into a WordPress page.

Required configuration

  • WordPress 5.4.0 or newer.
  • The Block Editor is needed to insert a DocuThèque into a WordPress page.

Français

Une organisation des media de WordPress plus orientée vers des besoins documentaires.

Présentation

Grâce à DocuThèques, vous bénéficiez d'une organisation alternative pour vos media dans WordPress. L'extension s'inspire des fonctionnalités des logiciels d'exploration de fichiers proposés par les systèmes d'exploitation des ordinateurs en vous proposant de créer des arborescences de dossiers pour y organiser vos media comme des documents.

DocuThèques équipe l'administration de votre site WordPress d'une nouvelle interface depuis laquelle vous pourrez créer la ou les DocuThèque(s) de votre site, y attacher des dossiers, y téléverser des documents ou y classer les media existants de votre site WordPress.

Pour faciliter vos premiers pas, cette interface propose un guide d'utilisation intégré grâce auquel vous pourrez vous familiariser avec les opérations à réaliser pour créer, mettre à jour et supprimer vos DocuThèques, vos dossiers et vos documents.

Chaque document de vos DocuThèques bénéficie d'un lien de téléchargement unique, permanent et indépendant de sa position dans l'arborescence de sa DocuThèque. Vous pouvez, à tout moment et en toute sérénité, mettre à jour le fichier associé à vos documents, changer le nom de chacun des dossiers qui forment leur arborescence : les visiteurs ou les membres de votre site retrouveront toujours la dernière version de votre document à l'aide de son lien de téléchargement unique et invariable.

Chaque document fait également l'objet d'un suivi du nombre de ses téléchargements par les visiteurs ou les membres de votre site.

Pour mettre une DocuThèque à leur disposition, il suffit de créer ou de mettre à jour une page WordPress pour l'y insérer grâce au bloc des DocuThèques. Notez qu'une page de votre site WordPress peut contenir une et une seule DocuThèque.

Configuration requise

  • WordPress 5.4.0 ou toute version ultérieure.
  • L'éditeur de blocs est nécessaire pour attacher une DocuThèque à une page du site WordPress.

Releases

4 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
1.0.1 latest
Apr 26, 2021 5 years ago
docutheques.zip
15
May 22, 2020 6 years ago
docutheques.zip
103
May 15, 2020 6 years ago
tag only
—
May 12, 2020 6 years ago
docutheques.zip
6

Active-site estimate ≈100 comes from the median of recent superseded releases. Method.

D+ grade

Security

DocuThèques 1.0.1 · audited by WP Registry

High-severity findings.

2 high
Audited release
1.0.1
Findings
2
Worst severity
high
Content hash
2c3054b38322ce7654d80ea1…

Findings

  • high Unauthenticated download of any media-library file by attachment slug

    file_access

    docutheque_parse_query() runs on the main query whenever the docutheques rewrite var is set (pretty URL /docutheques/{slug}/ or ?docutheques={slug}). It calls get_posts({name, post_type: attachment}), which WordPress fills with post_status=inherit, then docutheque_download() send the file with readfile(get_attached_file()) and Content-Disposition: attachment. There is no current_user_can('read_post'), no parent post_status/password check, and no has_term(..., 'dossiers') test, so the endpoint is not limited to documents an editor placed in a public DocuThèque. Core REST (WP_REST_Attachments_Controller::check_read_permission) hides inherit attachments of private/draft parents from anonymous users and treats unattached inherit attachments as non-public; this handler serves them to anyone who can guess or enumerate the post_name (typically a sanitized title, far easier than the dated uploads path). Because the file is streamed by PHP, the download also bypasses web-server rules that deny direct /wp-content/uploads access. A side effect is an unauthenticated update_post_meta on _docutheques_downloads_count.

    inc/functions.php:802-907

    Recommendation

    Before calling docutheque_download(), require the attachment to be assigned to the dossiers taxonomy, and call current_user_can('read_post', $id) (or the same parent-status logic as WP_REST_Attachments_Controller::check_read_permission) so private/draft/unattached media stay private. Do not serve files that fail those checks.

  • high Stored XSS via unescaped attachment titles in the public DocuThèques block

    xss_stored

    The frontend explorer prints attachment titles as HTML. In docutheques_render_block(), the server-side template substitution replaces {{{ data.title.rendered }}} with reset($document['title']) — the REST view-context rendered title from get_the_title() — with no esc_html(), while neighboring fields use esc_url/esc_attr/esc_html. That HTML is emitted in the page body, so a <script> payload in post_title executes for every visitor. The same Underscore/Lodash template (triple-stash unescaped interpolate) is compiled in the widget script and written with itemsContainer.innerHTML when a visitor opens a subfolder, so event-handler payloads (e.g. <img src=x onerror=...>) also run. WordPress does not kses post_title on insert; Author+ users have upload_files and the dossiers assign_terms cap (upload_files), so they can POST /wp/v2/media with a malicious title and dossiers[] pointing at a DocuThèque already embedded on a page. Folder names in the same renderer are escaped, which confirms titles were simply missed.

    inc/functions.php:627-649

    Recommendation

    Escape the title with esc_html() (or wp_kses_post if markup is intentional) in the PHP str_replace, change the template to {{ data.title.rendered }} so Lodash HTML-escapes it, and never assign lodash template output to innerHTML without escaping. Keep dossier-name escaping as a model.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.