CreaCaptcha

analytics-export.php

CSV export of the analytics event log.

Table of Contents

Functions

creationell_captcha_csv_cell()  : string
Neutralises a CSV cell against spreadsheet formula injection.
creationell_captcha_export_events()  : void
Streams the filtered event log as a CSV download.

Functions

creationell_captcha_csv_cell()

Neutralises a CSV cell against spreadsheet formula injection.

creationell_captcha_csv_cell(string $value) : string

A value beginning with =, +, - or @ can be executed as a formula by Excel or LibreOffice; the path column carries attacker-controlled request URIs. A leading single quote forces the spreadsheet to treat the value as text.

Parameters
$value : string

Raw cell value.

Return values
string

creationell_captcha_export_events()

Streams the filtered event log as a CSV download.

creationell_captcha_export_events() : void

Hooked to admin-post.php. Requires the manage_options capability and a valid nonce. The filter (search, event type, date range) is read from the request via the shared parser, so the export mirrors the on-screen filter.


        
On this page

Search results