Commit graph

11 commits

Author SHA1 Message Date
alexstanoev
3a53d96526 Validate MQTT broker IP and escape quotes when displaying
This commit implements address validation for the broker address in the MQTT configuration page of the CC26XX web demo example. Additionally, the Type ID, Org ID, Auth Token, Command Type and Event Type ID fields have quotes escaped (" -> ") to prevent XSS/broken page issues when displaying user-sourced input in HTML input fields.
2017-06-03 00:04:01 +01:00
George Oikonomou
c558e1a559 Revert "Validate MQTT broker IP and escape quotes when displaying" 2017-06-02 23:02:54 +01:00
alexstanoev
6b78ee9a4e MQTT: Validate broker IP and escape quotes when displaying
This commit implements address validation for the broker address in the
MQTT configuration page. Additionally, the Type ID, Org ID, Auth Token,
Command Type and Event Type ID fields have quotes escaped (" -> ")
to prevent XSS issues when displaying user-sourced input.
2017-06-02 15:13:58 +01:00
alexstanoev
a30364189a Zero out httpd_state before deallocating
When a connection is aborted by the HTTP server while it's still being processed it is possible to hit a null pointer dereference issue by jumping back to a protothread (outputpt) after its httpd_state has been freed. This can be triggered by sending a POST to any form in the CC26xx web demo server using Firefox.
This patch prevents that by zeroing out httpd_state structs before freeing them, thus also clearing the httpd_state->outputpt field.
Tested using Firefox 55.0a1 on a CC2650 LaunchPad.
2017-03-31 16:44:11 +01:00
Jonas Olsson
67045d4012 Export RSSI to default parent in the CC26xx web demo
The current version of the CC26xx web demo publishes over MQTT the default parent's IPv6 address and the last observed RSSI of this link. This is collected by active probing (periodic ping).

This commit brings the probing functionality to the example's main code module. The MQTT client keeps publishing as previously, but we now also export the same information through CoAP resources. Configuration is still possible through the example's web server.
2015-08-23 20:41:12 +01:00
George Oikonomou
7730215f99 Point all form action attributes to the current html page 2015-03-27 20:18:58 +00:00
George Oikonomou
7637164ae7 Parse filename for POST requests
so we can return it in the "Location:" header subsequently
2015-03-27 20:18:58 +00:00
George Oikonomou
54c1cd05e8 Simplify the page name to script mapping 2015-03-27 20:18:58 +00:00
George Oikonomou
90a3cd8e14 Change the way we handle HTTP response headers 2015-03-27 20:18:58 +00:00
George Oikonomou
733378679f Prettify httpd top matter in the web demo 2015-03-27 20:11:44 +00:00
Jonas Olsson
0f567e499f Add CC26xx examples 2015-02-25 13:15:35 +01:00