diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fc3df744..5b885a650 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v4.0.6-Alpha +- Fix throttling issue #656 +- Other miscellaneous fixes + ## v4.0.5-Alpha - Allow nulling out of throttle rules (to disable) - Disable Google Analytics by default (but enabled in production) diff --git a/app/defines.php b/app/defines.php index 082060cab..ec1a23ed4 100755 --- a/app/defines.php +++ b/app/defines.php @@ -3,7 +3,7 @@ namespace UserFrosting; // Some standard defines -define('UserFrosting\VERSION', '4.0.5-alpha'); +define('UserFrosting\VERSION', '4.0.6-alpha'); define('UserFrosting\DS', '/'); define('UserFrosting\PHP_MIN_VERSION', '5.6'); define('UserFrosting\DEBUG_CONFIG', false); diff --git a/app/sprinkles/account/locale/en_US/messages.php b/app/sprinkles/account/locale/en_US/messages.php index 588916d15..1bc251c72 100644 --- a/app/sprinkles/account/locale/en_US/messages.php +++ b/app/sprinkles/account/locale/en_US/messages.php @@ -65,8 +65,7 @@ "LOCALE.ACCOUNT" => "The language and locale to use for your account", "LOGIN" => [ - "@TRANSLATION" => "Login", - + "@TRANSLATION" => "Login", "ALREADY_COMPLETE" => "You are already logged in!", "SOCIAL" => "Or login with", "REQUIRED" => "Sorry, you must be logged in to access this resource." diff --git a/app/sprinkles/account/templates/pages/sign-in-or-register.html.twig b/app/sprinkles/account/templates/pages/sign-in-or-register.html.twig index 5bf4f99b8..e66a0cd43 100644 --- a/app/sprinkles/account/templates/pages/sign-in-or-register.html.twig +++ b/app/sprinkles/account/templates/pages/sign-in-or-register.html.twig @@ -3,7 +3,7 @@ {# Overrides blocks in head of base template #} {% block page_title %}{{translate('SIGNIN_OR_REGISTER')}}{% endblock %} -{% block page_description %}{{translate('LOGIN.DESCRIPTION', {'site_name': site.title })}}{% endblock %} +{% block page_description %}{{translate('PAGE.LOGIN.DESCRIPTION', {'site_name': site.title })}}{% endblock %} {% block body_attributes %} class="hold-transition login-page" diff --git a/app/sprinkles/core/src/Throttle/Throttler.php b/app/sprinkles/core/src/Throttle/Throttler.php index f29da73e4..c42db9f8d 100644 --- a/app/sprinkles/core/src/Throttle/Throttler.php +++ b/app/sprinkles/core/src/Throttle/Throttler.php @@ -87,13 +87,13 @@ public function getDelay($type, $requestData = []) ->get(); // Filter out only events that match the required JSON data - $events = $events->filter(function ($key, $item) use ($requestData) { + $events = $events->filter(function ($item, $key) use ($requestData) { $data = json_decode($item->request_data); // If a field is not specified in the logged data, or it doesn't match the value we're searching for, // then filter out this event from the collection. foreach ($requestData as $name => $value) { - if (!isset($data[$name]) || $data[$name] != $value) { + if (!isset($data->$name) || ($data->$name != $value)) { return false; } } diff --git a/webserver-configs/nginx.conf b/webserver-configs/nginx.conf index ed6227ccf..880fbf708 100644 --- a/webserver-configs/nginx.conf +++ b/webserver-configs/nginx.conf @@ -22,14 +22,14 @@ server { root /usr/share/nginx/project/public; server_name example.com; ## End - Server Info - + ## SSL configuration - ## It is STRONGLY RECOMMENDED that you use SSL for all traffic to your UF site. + ## It is STRONGLY RECOMMENDED that you use SSL for all traffic to your UF site. ## Otherwise, you are potentially leaking your users' sensitive info, including passwords! ## See https://letsencrypt.org/ to find out how to get a free, trusted SSL cert for your site. # #listen 443 ssl spdy; # we listen ssl first with spdy second. if browser support spdy it will attempt to upgrade immediately on handshake - #listen [::]:443 ssl spdy; + #listen [::]:443 ssl spdy; ## Certificate paths (example for letsencrypt) #ssl_certificate /etc/letsencrypt/live//fullchain.pem; #ssl_certificate_key /etc/letsencrypt/live//privkey.pem; @@ -81,7 +81,7 @@ server { } ## we can cache some static files - location ~* \.[^png|gif|jpg|jpeg|ico|css|js|woff|ttf|otf|woff2|eot]$ { + location ~* \.(png|gif|jpg|jpeg|ico|css|js|woff|ttf|otf|woff2|eot)$ { include /etc/nginx/mime.types; expires max; }