Update recent-request check to also use the station request threshold.

This commit is contained in:
Buster "Silver Eagle" Neece 2017-10-14 19:21:38 -05:00
parent 1f8765786b
commit b93e6f1042
7 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ class StationRequestRepository extends BaseRepository
$user_ip = $_SERVER['REMOTE_ADDR'];
// Check for any request (on any station) within the last $threshold_seconds.
$threshold_seconds = 300;
$threshold_mins = (int)($station->getRequestThreshold() ?? 5);
$threshold_seconds = $threshold_mins * 60;
$recent_requests = $this->_em->createQuery('SELECT sr FROM ' . $this->_entityName . ' sr WHERE sr.ip = :user_ip AND sr.timestamp >= :threshold')
->setParameter('user_ip', $user_ip)

0
docker-backup.sh Normal file → Executable file
View File

0
docker-install.sh Normal file → Executable file
View File

0
docker-restore.sh Normal file → Executable file
View File

0
docker-uninstall.sh Normal file → Executable file
View File

0
docker-update.sh Normal file → Executable file
View File

0
util/docker-compose-dev.sh Normal file → Executable file
View File