Skip to content

Commit ed8eba1

Browse files
committed
Bump version to 1.7.0 & update changelog
1 parent db8b5f6 commit ed8eba1

5 files changed

Lines changed: 27 additions & 27 deletions

File tree

gravityforms-zero-spam.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Gravity Forms Zero Spam
44
* Plugin URI: https://www.gravitykit.com?utm_source=plugin&utm_campaign=zero-spam&utm_content=pluginuri
55
* Description: Enhance Gravity Forms to include effective anti-spam measures—without using a CAPTCHA.
6-
* Version: 1.6.0
6+
* Version: 1.7.0
77
* Author: GravityKit
88
* Author URI: https://www.gravitykit.com?utm_source=plugin&utm_campaign=zero-spam&utm_content=authoruri
99
* Requires PHP: 7.4

includes/class-gf-zero-spam-token-endpoint.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* REST API and admin-ajax endpoints for token minting.
44
*
5-
* @since TBD
5+
* @since 1.7.0
66
*/
77

88
if ( ! defined( 'WPINC' ) ) {
@@ -14,7 +14,7 @@ class GF_Zero_Spam_Token_Endpoint {
1414
/**
1515
* Maximum token requests per IP per minute.
1616
*
17-
* @since TBD
17+
* @since 1.7.0
1818
*
1919
* @var int
2020
*/
@@ -23,7 +23,7 @@ class GF_Zero_Spam_Token_Endpoint {
2323
/**
2424
* REST API namespace.
2525
*
26-
* @since TBD
26+
* @since 1.7.0
2727
*
2828
* @var string
2929
*/
@@ -32,7 +32,7 @@ class GF_Zero_Spam_Token_Endpoint {
3232
/**
3333
* Registers hooks for both REST and admin-ajax endpoints.
3434
*
35-
* @since TBD
35+
* @since 1.7.0
3636
*/
3737
public function __construct() {
3838
add_action( 'rest_api_init', [ $this, 'register_rest_route' ] );
@@ -43,7 +43,7 @@ public function __construct() {
4343
/**
4444
* Registers the REST API route for token minting.
4545
*
46-
* @since TBD
46+
* @since 1.7.0
4747
*
4848
* @return void
4949
*/
@@ -69,7 +69,7 @@ public function register_rest_route() {
6969
/**
7070
* Handles the REST API token request.
7171
*
72-
* @since TBD
72+
* @since 1.7.0
7373
*
7474
* @param WP_REST_Request $request The REST request.
7575
*
@@ -84,7 +84,7 @@ public function handle_rest( $request ) {
8484
/**
8585
* Handles the admin-ajax token request.
8686
*
87-
* @since TBD
87+
* @since 1.7.0
8888
*
8989
* @return void
9090
*/
@@ -108,7 +108,7 @@ public function handle_ajax() {
108108
/**
109109
* Shared handler that validates the request and mints a token.
110110
*
111-
* @since TBD
111+
* @since 1.7.0
112112
*
113113
* @param int $form_id The form ID to mint a token for.
114114
*
@@ -157,7 +157,7 @@ private function handle_token_request( int $form_id ) {
157157
/**
158158
* Checks per-IP rate limit using transients.
159159
*
160-
* @since TBD
160+
* @since 1.7.0
161161
*
162162
* @return true|WP_Error True if within limits, WP_Error if exceeded.
163163
*/
@@ -171,7 +171,7 @@ private function check_rate_limit() {
171171
* Useful for sites behind Cloudflare, load balancers, or reverse proxies
172172
* where REMOTE_ADDR is the proxy IP, not the visitor's IP.
173173
*
174-
* @since TBD
174+
* @since 1.7.0
175175
*
176176
* @param string $ip The client IP address. Default: $_SERVER['REMOTE_ADDR'].
177177
*/
@@ -187,7 +187,7 @@ private function check_rate_limit() {
187187
*
188188
* Increase for sites behind corporate NAT or shared IP environments.
189189
*
190-
* @since TBD
190+
* @since 1.7.0
191191
*
192192
* @param int $limit The maximum request count per minute. Default: 30.
193193
*/

includes/class-gf-zero-spam-token.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Stateless HMAC-SHA256 token minting and validation.
44
*
5-
* @since TBD
5+
* @since 1.7.0
66
*/
77

88
if ( ! defined( 'WPINC' ) ) {
@@ -14,7 +14,7 @@ class GF_Zero_Spam_Token {
1414
/**
1515
* Mints a signed anti-spam token for a given form.
1616
*
17-
* @since TBD
17+
* @since 1.7.0
1818
*
1919
* @param int $form_id The Gravity Forms form ID.
2020
* @param int $ttl Token time-to-live in seconds. Default 600 (10 minutes).
@@ -36,7 +36,7 @@ public static function mint( int $form_id, int $ttl = 600 ): string {
3636
/**
3737
* Validates a signed anti-spam token.
3838
*
39-
* @since TBD
39+
* @since 1.7.0
4040
*
4141
* @param string $token The token to validate.
4242
* @param int $expected_form_id The form ID the token must match.
@@ -145,7 +145,7 @@ public static function validate( string $token, int $expected_form_id ): array {
145145
* Uses WordPress AUTH_KEY and SECURE_AUTH_KEY constants, which are unique per
146146
* site and never exposed in HTML output.
147147
*
148-
* @since TBD
148+
* @since 1.7.0
149149
*
150150
* @param int $salt_version The salt version number.
151151
*
@@ -158,7 +158,7 @@ public static function get_site_secret( int $salt_version ): string {
158158
/**
159159
* Returns the current salt version.
160160
*
161-
* @since TBD
161+
* @since 1.7.0
162162
*
163163
* @return int The current salt version number.
164164
*/
@@ -169,7 +169,7 @@ public static function get_salt_version(): int {
169169
/**
170170
* Returns the previous salt version, if one exists during a rotation window.
171171
*
172-
* @since TBD
172+
* @since 1.7.0
173173
*
174174
* @return int|null The previous salt version, or null if not in a rotation window.
175175
*/
@@ -186,7 +186,7 @@ public static function get_previous_salt_version(): ?int {
186186
/**
187187
* Encodes data using base64url (RFC 4648 section 5).
188188
*
189-
* @since TBD
189+
* @since 1.7.0
190190
*
191191
* @param string $data The data to encode.
192192
*
@@ -199,7 +199,7 @@ public static function base64url_encode( string $data ): string {
199199
/**
200200
* Decodes a base64url-encoded string (RFC 4648 section 5).
201201
*
202-
* @since TBD
202+
* @since 1.7.0
203203
*
204204
* @param string $data The base64url-encoded string.
205205
*

includes/class-gf-zero-spam.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function add_key_field( $form ) {
207207
/**
208208
* Filters the timeout (in milliseconds) for AJAX token fetch attempts.
209209
*
210-
* @since TBD
210+
* @since 1.7.0
211211
*
212212
* @param int $timeout Timeout in milliseconds. Default 3000.
213213
*/
@@ -458,7 +458,7 @@ public function check_key_field( $is_spam = false, $form = [], $entry = [] ) {
458458
* Sets a migration deadline on first encounter and accepts the legacy key
459459
* until the deadline passes. After the deadline, the legacy key is rejected.
460460
*
461-
* @since TBD
461+
* @since 1.7.0
462462
*
463463
* @param string $submitted_key The submitted legacy key.
464464
*
@@ -495,7 +495,7 @@ private function validate_legacy_key( string $submitted_key ) {
495495
/**
496496
* Displays an admin notice during the migration from static key to signed tokens.
497497
*
498-
* @since TBD
498+
* @since 1.7.0
499499
*
500500
* @return void
501501
*/
@@ -527,7 +527,7 @@ public function migration_notice() {
527527
/**
528528
* Cleans up legacy options after the migration deadline has passed.
529529
*
530-
* @since TBD
530+
* @since 1.7.0
531531
*
532532
* @return void
533533
*/

readme.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: gravityview
33
Tags: gravity forms, spam, captcha, honeypot, anti-spam
44
Requires at least: 4.7
55
Tested up to: 6.9.1
6-
Stable tag: 1.6.0
6+
Stable tag: 1.7.0
77
Requires PHP: 7.4
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -110,9 +110,9 @@ You can enable a spam summary report email. This email will be sent to the email
110110

111111
== Changelog ==
112112

113-
= develop =
113+
= 1.7.0 on March 5, 2026 =
114114

115-
* Added: Stronger spam prevention using signed, time-limited tokens fetched at submit time
115+
* Added: Stronger spam prevention using signed, time-limited tokens
116116
* API: Added `gf_zero_spam_client_ip` filter to override the visitor IP used for rate limiting (useful for sites behind Cloudflare or load balancers)
117117
* API: Added `gf_zero_spam_rate_limit` filter to adjust the maximum token requests allowed per IP per minute (default: 30)
118118

0 commit comments

Comments
 (0)