外掛標籤
開發者團隊
原文外掛簡介
Cozzetto’s TOCTOU Guard protects the site against a class of TOCTOU
(time-of-check / time-of-use) attacks and against accidental double execution.
When several identical POST requests arrive at the same moment — from a user
double-clicking, or from an attack firing many twin requests — the first
request wins and the others are rejected. The decision is made atomically by
the database through a unique key, so the race that a TOCTOU attack relies on
does not exist.
Problems it avoids: duplicate orders, duplicate sign-ups, double votes, a
coupon used twice.
Email alerts: when a block is triggered, the site administrator receives an
immediate email (at most one per IP per hour, to avoid flooding the mailbox).
A periodic report (daily, weekly or monthly) lists the blocked IP addresses
with full details. A button lets you send the report on demand.
Optional IP geolocation: you can enable geolocation of blocked IP addresses
(off by default). See “External services” below.
Lightweight: two small tables, no external library, no paid service. Designed
not to break legitimate traffic (different submissions have different content
and always pass; on an internal error the request is allowed through).
External services
This plugin can optionally use the geolocation service ip-api.com.
The service is used ONLY when the “IP geolocation” option is enabled on the
settings screen. This option is OFF by default, so by default the plugin
contacts no external service at all.
When the option is enabled, and only when a request is blocked, the plugin
sends the blocked visitor’s IP address to ip-api.com in order to obtain the
country, city and network provider of that IP. This information is then shown
in the administrator’s alert email and in the periodic report. The result is
cached for up to 12 hours per IP to limit the number of calls. No data is sent
while the option is disabled.
Service provider: ip-api.com (endpoint http://ip-api.com/json/).
Terms of use and privacy notice: https://ip-api.com/docs/legal
