When limiting submissions, this module tracks by IP. In environments behind a proxy, this is unacceptable. However, if multiple submissions are allowed, then guests are allowed to submit which is also unacceptable.

I suggest the option to track by either IP or user ID when creating a form.

Comments

allie micka’s picture

Status: Active » Needs review
StatusFileSize
new699 bytes

We have encountered this issue as well. Webform submissions are being limited by IP address AND username, when they really should be limited by IP address OR username.

With the present configuration, submissions are limited by IP address, even when each person behind the firewall is logged in as a different user. Worse, they're ALSO limited by username, which means that a limited number of anonymous users can submit!

My patch adjusts the behavior from:

WHERE (user = '%s' OR remote_addr = '%s')

To:

WHERE (( %d = 0 AND remote_addr = '%s') OR user = '%s' )

That is, we'll only limit the submissions by IP when the user is not logged in.

quicksketch’s picture

This looks good. Could you create the patch using the unified format (using the -u tag)?

More info: http://drupal.org/diffandpatch

Thanks!

Nikkol’s picture

this seems to be working for me as well. I'd like to see an option to not allow anonymous submissions at all, but I suppose this can be handled through node access.

quicksketch’s picture

Status: Needs review » Fixed

@Allie Micka, thanks for the contribution! Committed to HEAD and 4.7!

jsouth775’s picture

Title: limit submissions tracks IP ... won't work behind proxy server » limit submissions tracks IP ... won't work behind proxy server or on postgreSQL
Status: Fixed » Needs review
StatusFileSize
new673 bytes

The user column name seems to be reserved in postgreSQL. Patch attached.

quicksketch’s picture

StatusFileSize
new1.08 KB

Thanks jsouth for catching this. Your patch seems to break the mySQL implementation :D

Does the above patch correct the problem in pgsql? If so I'll commit it. Thanks!

quicksketch’s picture

Status: Needs review » Closed (fixed)

The last patch was applied some time ago. Closing.