Lock the private folder.
Then check the public doors.
The nginx rule for uploads/catchline-private, the Apache rules the module writes itself, moving uploads outside the web root, the public addresses the module opens, and a checklist before you go live.
01Why uploads/catchline-private must not be reachable
uploads/catchline-private/ holds the files visitors upload through your forms (CVs, photos, documents) and CSV files waiting for import. The module protects it three ways: files get a random name prefix in a folder per submission and are only handed to logged-in staff through the module; the folder gets an Apache deny-all rule and an index.html; and the import/ folder gets the same deny-all rule and index.html. On nginx the .htaccess files have no effect, so add the rule below.
02nginx: deny uploads/catchline-private
- Open the server block. Find your CRM's nginx configuration (for example in
/etc/nginx/sites-available/; your host's panel may offer "custom nginx directives" instead). - Add the rule. Put it inside the
server { … }block. The^~makes nginx use this block before any\.php$rule, so files in the folder are never run or served.
If Perfex is installed in a subfolder, include it:# Catchline: no direct web access to form uploads and CSV imports location ^~ /uploads/catchline-private/ { deny all; }location ^~ /crm/uploads/catchline-private/ { … }. - Test and reload.
sudo nginx -t sudo systemctl reload nginx - Check from outside after the first upload (the folder is created then). This must answer
403(or404), never200:curl -I https://crm.example.com/uploads/catchline-private/index.html
03Apache: the rules the module writes
When the first file is stored or the first CSV file is previewed, the module writes this .htaccess into uploads/catchline-private/, and the same one into its import/ folder:
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
Apache reads .htaccess files only where AllowOverride permits it. Run the same curl -I check. If it answers 200, add the rule to your virtual host instead and reload Apache:
<Directory "/path/to/your/crm/uploads/catchline-private">
Require all denied
</Directory>
04Optional: keep uploads outside the web root
Catchline can store uploads in any folder the web server can write to, for example one outside the public folder of your site. Version 1.0.0 has no screen for this; it reads the Perfex option catchline_storage_path. With a database tool (phpMyAdmin or similar), and your own table prefix instead of tbl:
INSERT INTO tbloptions (name, value, autoload)
VALUES ('catchline_storage_path', '/home/youruser/catchline-files', 0);
- The path must be absolute, exist and be writable by the web server; otherwise Catchline silently uses
uploads/catchline-private/again. The System check's Private file storage row shows whether it is writable. - Files already stored stay where they were. Move the numbered folders over with the same structure if you change it later.
- Uninstall deletes the option, the files Catchline stored there (uploads and CSV files waiting for import), its guard files and its
import/folder. Your folder itself is removed only when nothing else is left in it; files with names Catchline never gives stay.
05The public addresses the module opens
| Address | For | Protected by |
|---|---|---|
/catchline/f/<slug>, /catchline/f/embed/<id>.js, /catchline/f/form/<id> | Hosted page, embed script, form definition | Only published forms with their source switched on answer; the definition carries no mapping or storage details |
/catchline/f/submit|partial|event/<id> | Answers, unfinished answers, view and start counts | A signed token per form view (24 hours), the server's own validation and logic check, spam checks, rate limits, size limits (256 KB of answers plus each file field's limit) |
/catchline/hook/in/<id>-<secret> | Leads from form tools and Google Ads | The secret in the link (compared in constant time), the tool's signature or a secret header, size and rate limits, a repeat window |
/catchline/meta/in/<id>-<secret> | Lead Ads notifications | The secret in the link, the verify token for Meta's check, X-Hub-Signature-256 with your App Secret |
/catchline/feed/google/<secret>.csv | The Google Ads conversion file | A 48-character secret, compared in constant time; a wrong one gets the same "not found" as a missing one |
/catchline/t/o|c|u/<token> | Open, click and unsubscribe links in follow-up e-mails | Random single-purpose tokens; a click link redirects only to the address stored for it; unsubscribe needs a confirming POST |
The posting addresses are listed in the module's config/csrf_exclude_uris.php, because visitors, Meta and form tools post without a CRM session; each checks that the module is active and verifies its own secret, signature or token. Every admin page needs a Perfex staff login and the matching Catchline permission, and every change needs a POST with Perfex's CSRF token.
Outgoing requests (webhooks, reply mailboxes, a custom AI endpoint) refuse private network, local and cloud metadata addresses, so a saved address cannot be used to reach machines inside your network.
06Before you go live
- Your CRM runs on
https://only. - The
uploads/catchline-private/check above answers 403 or 404. application/config/app-config.php(the encryption key) and the database are in your backups, and the backups are protected.- Every signed source has its signing secret saved; sources that can send a header have a shared secret.
- Webhook links are pasted only into the tools. If one leaks, press Create a new link and update the tool.
- Google Ads sources have their key saved.
- Forms that face heavy spam use a captcha; the sending limits fit your traffic.
- Staff have only the Catchline permissions they need. Settings, conversions and webhooks are administrators only anyway.
- You decided on the payload retention, unfinished answers, IP storage, cookie consent and the Meta events (Privacy).