Debian Codegraph @

debian/control

raw
1 Source: libcgi-application-plugin-ratelimit-perl
2 Maintainer: Debian Perl Group <[email protected]>
3 Section: perl
4 Testsuite: autopkgtest-pkg-perl
5 Priority: optional
6 Build-Depends: debhelper-compat (= 13)
7 Build-Depends-Indep: libcgi-pm-perl | perl (<< 5.19),
8 perl,
9 libcgi-application-perl,
10 libclass-accessor-perl,
11 libdbi-perl,
12 libdbd-sqlite3-perl
13 Standards-Version: 3.9.6
14 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libcgi-application-plugin-ratelimit-perl
15 Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libcgi-application-plugin-ratelimit-perl.git
16 Homepage: https://metacpan.org/release/CGI-Application-Plugin-RateLimit
17
18 Package: libcgi-application-plugin-ratelimit-perl
19 Architecture: all
20 Depends: ${misc:Depends},
21 ${perl:Depends},
22 libcgi-application-perl,
23 libclass-accessor-perl
24 Recommends: libcgi-application-plugin-dbh-perl
25 Enhances: libcgi-application-perl
26 Description: Perl module for limiting the runmode call rate per user
27 CGI::Application::Plugin::RateLimit provides protection against a user
28 calling a runmode too frequently. A typical use-case might be a contact form
29 that sends email. You'd like to allow your users to send you messages, but
30 thousands of messages from a single user would be a problem.
31 .
32 This module works by maintaining a database of hits to protected runmodes. It
33 then checks this database to determine if a new hit should be allowed based
34 on past activity by the user. The user's identity is, by default, tied to
35 login (via REMOTE_USER) or IP address (via REMOTE_IP) if login info is not
36 available. You may provide your own identity function via the
37 identity_callback() method.
38 .
39 To use this module you must create a table in your database with the
40 following schema (using MySQL-syntax, although other DBs may work as well
41 with minor alterations):
42 .
43 CREATE TABLE rate_limit_hits (
44 user_id VARCHAR(255) NOT NULL,
45 action VARCHAR(255) NOT NULL,
46 timestamp UNSIGNED INTEGER NOT NULL,
47 INDEX (user_id, action, timestamp)
48 );
49 .
50 You may feel free to vary the storage-type and size of user_id and action to
51 match your usage. For example, if your identity_callback() always returns an
52 integer you could make user_id an integer column.
53 .
54 This table should be periodically cleared of old data. Anything older than the
55 maximum timeframe being used can be safely deleted.
56 .
57 IMPORTANT NOTE: The protection offered by this module is not perfect.
58 Identifying a user on the internet is very hard and a sophisticated attacker
59 can work around these checks, by switching IPs or automating login creation.