Skip to content

Flood protection ​

/dashboard/settings/flood-protection

Flood protection blocks file uploads from an IP address when it uploads too many files in a period of time. Enabling it is highly recommended, as it stops bots and abusive users from filling your storage.

Pro feature

Flood protection is available in Chevereto Pro. If CHEVERETO_ENABLE_UPLOAD_FLOOD_PROTECTION is set to 0, flood protection is always disabled, whatever is set here. See Toggles.

How flood protection works ​

Before each upload, Chevereto counts the files uploaded from the client IP address in the last minute, hour, day, week and month. If any count reaches its limit, the upload is rejected with this message:

Flooding detected. You can only upload 50 images per minute

Things to keep in mind:

  • Uploads are counted by IP address, not by user. All users and guests sharing an IP address share the same limits.
  • Periods are rolling: "minute" means the last 60 seconds, "day" the last 24 hours, and so on.
  • Only files still on your website are counted. Deleted files don't count towards the limits.
  • Administrators are never limited, and files added with the bulk importer aren't checked.
  • Album creation is also limited when flood protection is enabled, using fixed limits of 20 albums per minute, 200 per hour, 400 per day, 2000 per week and 10000 per month.

WARNING

Flood protection relies on detecting the real client IP address. If your website is behind a proxy or CDN that isn't configured to pass the client IP, all visitors may share the proxy IP address and get blocked together.

Flood protection toggle ​

Toggles flood protection. The other settings are shown only when it is enabled.

ValueEffect
EnabledLimit uploads per IP address (default)
DisabledDon't limit uploads

Notify to email ​

Toggles sending an email when a flood is detected.

ValueEffect
EnabledSend an email when a flood is detected
DisabledDon't send an email (default)

The email is sent to the incoming email address, with the subject System notification: Flood report IP <ip>. It links to the images uploaded from that IP address, to the user profile if the uploader is logged in, and shows the upload counts per period.

To avoid filling your inbox, the email is sent once per session for each period that gets exceeded.

Upload limits ​

Each limit sets the maximum number of files that a single IP address can upload in that period. Set a limit to 0 to turn off the check for that period.

SettingPeriodTypeDefault
Minute limitLast minuteInteger50
Hourly limitLast hourInteger500
Daily limitLast 24 hoursInteger1000
Weekly limitLast weekInteger5000
Monthly limitLast monthInteger10000

Keep each limit higher than the one before it, as a lower limit for a longer period makes the shorter one useless. For example, a daily limit of 100 blocks uploads before an hourly limit of 500 is ever reached.

If your users usually upload large batches, such as full photo albums, raise the minute and hourly limits so legitimate uploads aren't blocked.

Released under the Apache-2.0 License.