WP Manifestindependent plugin directory

Install

Download mqtt-cogs_v2.3.zip From the v2.3 release on GitHub, Mar 4, 2020

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

Install straight from GitHub with WP-CLI:

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

Wordpress MQTT plugin

Synopsis

MqttCogs maintains a persistent (well semi persistent) connection to an Mqtt Broker. When a message arrives on a subscribed topic, it persists it to a custom database table in wordpress.

So that you can ‘see’ the data in your blog it provides a number shortcodes for visualizing your data. Visualization uses Google Visualization

Code Example

[ mqttcogs_drawgoogle charttype=”LineChart” ]

[ mqttcogs_data limit=”40″ topics=”mysensors_out/100/1/1/0/0″ ]

[ /mqttcogs_drawgoogle ]

Motivation

I’ve been mucking around with IoT (internet of things) projects for over a year now. I started with Arduino & the MySensors project. Annoyingly, it really isn’t as easy as you think!

I didn’t want to rent a server and then have to install IOT Controller software. What I do have though is a wordpress blog. This costs me $1.50 per month to rent. So I started wondering about getting MQTT data into the WordPress database and visualizing the data on my blog.

Demo & Documentation

http://mqttcogs.sailresults.org/

Installation

http://mqttcogs.sailresults.org/get-started-with-mqttcogs/

Shortcode Reference

http://mqttcogs.sailresults.org/shortcodes/

Hook Reference

http://mqttcogs.sailresults.org/hooks/

Contributors

Me at the moment but let me know if you want to help out. See http://mqttcogs.sailresults.org/about/ for contact information

License

A short snippet describing the license (MIT, Apache, etc.)

Releases

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

Tag
Published
Assets
Downloads
v3.0 latest
Jun 5, 2023 3 years ago
tag only
—
Dec 13, 2021 4 years ago
tag only
—
Mar 24, 2020 6 years ago
tag only
—
Mar 5, 2020 6 years ago
tag only
—
Mar 4, 2020 6 years ago
mqtt-cogs_v2.3.zip
12
2.2
May 26, 2019 7 years ago
tag only
—
May 15, 2019 7 years ago
tag only
—
2.1
May 10, 2019 7 years ago
tag only
—
2.0
May 3, 2019 7 years ago
mqtt-cogs-v2.0.zip
13
Dec 29, 2018 7 years ago
mqttcogs-v1.4.zip
19
May 4, 2018 8 years ago
mqttcogs-v1.3.zip
35
May 4, 2018 8 years ago
tag only
—
May 4, 2018 8 years ago
tag only
—
Apr 11, 2017 9 years ago
mqtt-cogs.zip
22
D+ grade

Security

Mqtt Cogs 0.1 · audited by WP Registry

High-severity findings.

1 high 1 medium
Audited release
0.1
Findings
2
Worst severity
high
Content hash
f678340f506f79bcddc6c137…

Findings

  • high Contributor stored XSS via shortcode script= attribute (post meta executed with new Function)

    xss_stored

    The drawHTML/drawGoogle/drawLeaflet/drawDataTable shortcodes accept a script attribute naming a post meta key; the meta value is localized into the page and executed client-side with new Function(). Contributors (no unfiltered_html) can add arbitrary custom fields to their own posts and embed the shortcode, so their JS runs for any editor/admin who previews or views the post.

    MqttCogs_Plugin.php:1590-1658

    Recommendation

    Only honour script= when the post author has unfiltered_html (author_can($post, 'unfiltered_html')), or require a protected (underscore-prefixed) meta key editable only by admins.

  • medium Unauthenticated JSONP callback reflection in doGetTopN (tqx responseHandler)

    xss_reflected

    The responseHandler value parsed from $_GET['tqx'] is echoed unescaped as the JS function prefix of the response with Content-type application/javascript. Any visitor can make the site serve arbitrary attacker-chosen JavaScript from its own origin (usable as a <script src> gadget to bypass CSP script-src 'self' when combined with any HTML injection).

    MqttCogs_Plugin.php:985-1016

    Recommendation

    Validate responseHandler against /^[A-Za-z_$][\w.$]*$/ (or drop JSONP and use wp_send_json), and send X-Content-Type-Options: nosniff.

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.