WP Manifestindependent plugin directory
manifest / content / uri-people-tool

URI People Tool WP Registry grade D+. High-severity findings · 2 findingsWP RegistryHigh-severity findings · 2 findingsOpen the reportD+

A plugin to create and display custom bibliographic posts

★ 2stars
1.2kcomposer installs
v1.5latest · 3 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/uriweb/uri-people-tool/archive/refs/heads/develop.zip

On Packagist as uriweb/uri-people-tool:

composer require uriweb/uri-people-tool
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A tool that makes it easy to create and edit custom bibliographic posts for people in the department. The tool appears in the WordPress admin sidebar.

This project was derived from part of the URI Post Types plugin that is built into the URI Department theme.

People Tool creates a custom post type for people and a taxonomy to go with it. It also provides a short code to display lists of people by group.

Shortcode

The base syntax for the shortcode is as follows: [uri-people-tool]. There are additional attributes that can be used to further customize the shortcode's output.

Shortcode attributes

All of the options below are optional.

# `group` expects the slug of a valid peoplegroup category.
# `posts_per_page` expects a whole number. It limits the results to the specified amount. Default is 200
# `thumbnail` expects the name of an image format e.g. "medium" or "third_column"  Set to "false" to hide thumbnails.
# `link` controls whether or not the card lists link to posts.  Set to "false" to not link (default: true)
# `phone` controls whether or not to display the phone number on card lists (default: true)
# `department` controls whether or not to display the department on card lists (default: true)
# `website` controls whether or not to display the website on card lists (default: false)
# `address` controls whether or not to display the street address on card lists (default: false)
# `email` controls whether or not to display the email address on card lists (default: true)
# `before` allows HTML to be inserted before the list of people. It defaults to `<div class="uri-people-tool">`
# `after` allows HTML to be inserted after the list of people. It defaults to `</div>`

Examples

Display a list of people in a "faculty" group in a two column layout:

[uri-people-tool group="faculty" before='<div class="uri-people-tool cl-tiles halves">' after="</div>"]

Display a list of people in a "faculty" group as a three column layout, show street address and hide department:

[uri-people-tool group="faculty" department="false" address="true" before='<div class="uri-people-tool cl-tiles thirds">' after="</div>"]

Display a list of all people without links to people posts:

[uri-people-tool link="false"]

Display a list of all people with the Accepting Student field information:

[uri-people-tool accepting_students="true"]

Theming the output

This plugin includes default templates. The templates will likely require customization to match your site's theme. To customize the templates, copy one or both of uri-people-tool/templates/person-card.php and uri-people-tool/templates/single-people.php to your theme's directory -- either into your theme's root, or into a directory in your theme called templates. person-card handles the shortcode output, and single-people handles the page view of each person.

Edit the files in your theme to taste.

Plugin Details

Contributors: John Pennypacker, Brandon Fuller, Alexandra Gauss Tags: posts, people

Releases

10 releases.

Tag
Published
v1.5 latest
Sep 22, 2023 3 years ago
Mar 8, 2023 3 years ago
Oct 31, 2020 5 years ago
1.2
Jun 28, 2019 7 years ago
1.1
Mar 1, 2019 7 years ago
Aug 24, 2018 8 years ago
Aug 22, 2018 8 years ago
Aug 14, 2018 8 years ago
0.4
Jul 10, 2018 8 years ago
0.3
Mar 9, 2018 8 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

D+ grade

Security

URI People Tool 1.5 · audited by WP Registry

High-severity findings.

2 high
Audited release
1.5
Findings
2
Worst severity
high
Content hash
045f9d625a6550c2f78a539b…

Findings

  • high Contributor+ stored XSS via [uri-people-tool] before/after (html_entity_decode)

    xss_stored

    uri_people_tool_get_people() echoes html_entity_decode($args['before']) and html_entity_decode($args['after']) with no wp_kses. Those strings come from [uri-people-tool] shortcode attributes (defaults are wrapper divs; README documents arbitrary HTML). A Contributor or higher can insert [uri-people-tool before="<script>alert(document.domain)</script>"] or [uri-people-tool before='x"><img src=x onerror=alert(1)>'] into a post. WordPress kses for users without unfiltered_html strips raw tags but does not interpret shortcode attribute text and leaves HTML entities intact; html_entity_decode then reconstitutes executable markup. When the post is previewed or published, the_content runs the shortcode and the payload executes in the viewer's browser (including an editor previewing a pending post). This plugin targets URI department sites, commonly on multisite where even administrators lack unfiltered_html, so the same entity bypass also applies there. Observable consequence: JS runs in the origin of any page rendering the listing, enabling session/nonce theft.

    uri-people-tool.php:133-157

    Recommendation

    Do not echo decoded shortcode HTML raw. After decode, pass the wrappers through wp_kses() with an allowlist of harmless wrapper tags/attributes (e.g. div/span + class), or drop html_entity_decode and require authors with unfiltered_html to supply tags. Example: echo wp_kses( html_entity_decode( $args['before'] ), array( 'div' => array( 'class' => true, 'id' => true ), 'span' => array( 'class' => true ) ) );

  • high Author+/Contributor stored XSS via unescaped people email and URL fields

    xss_stored

    The people CPT uses capability_type=post (Author can publish; Contributor can draft) and supports custom-fields, with ACF text fields peopleemail, peopleurl, peoplegooglescholar, and peopleresearchgate (not type email/url). templates/person-card.php concatenates get_field('peopleemail') into href="mailto:…" and get_field('peopleurl') into href without esc_url/esc_attr/esc_html; templates/single-people.php prints the same keys (plus the Google Scholar and ResearchGate URLs) via the_field() inside <a href>. ACF does not escape on output, and a native Custom Fields metabox write bypasses field-type UI entirely. A payload such as foo@x.com" onclick="alert(1) or javascript:alert(1) is stored in post meta and executes for every visitor of a listing that includes email/website or of /meet/{person}. peoplecustom is also echo wpautop()'d with no wp_kses_post (the apply_filters('the_content') result is discarded). This is not mitigated by Contributor kses on post_content, because the values live in post meta. Observable consequence: JS in the site origin on directory cards and profile pages, including when an administrator views them.

    templates/person-card.php:12-21

    Recommendation

    Escape on output: esc_html() for visible text, esc_attr() inside mailto:, and esc_url() on website/Scholar/ResearchGate hrefs (esc_url strips javascript:). In templates/single-people.php apply the same to the_field('peopleemail'), the_field('peopleurl'), the_field('peoplegooglescholar'), and the_field('peopleresearchgate'). Run peoplecustom through wp_kses_post() (and use the the_content filter return value). Prefer ACF field types email/url with sanitization on save.

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.