Skip to content

Commit

Permalink
Release version 4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianwennink authored Dec 19, 2023
2 parents efe58d2 + cf05c9a commit a001176
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body:
attributes:
label: IconCaptcha version
description: Please specify the version of the package that you are using.
placeholder: "e.g. 4.0.2"
placeholder: "e.g. 4.0.3"
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2_blank_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body:
attributes:
label: IconCaptcha version
description: Please specify the version of the package that you are using.
placeholder: "e.g. 4.0.2"
placeholder: "e.g. 4.0.3"
validations:
required: true
- type: input
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes will be documented in this file. Only changes starting at IconCaptcha 2.0.2 have been recorded.

## 4.0.3 - Dec 19, 2023
Release: [View tag 4.0.3](https://github.com/fabianwennink/IconCaptcha-PHP/releases/tag/4.0.3)

### Fixed
- Removed the request timestamp check due to unreliability after multiple reports indicated false positives, e.g. when the browser or server clocks were out of sync.

For a full list of commits and changes, please refer to the [full commit changelog](https://github.com/fabianwennink/IconCaptcha-PHP/compare/4.0.2...4.0.3).

## 4.0.2 - Dec 16, 2023
Release: [View tag 4.0.2](https://github.com/fabianwennink/IconCaptcha-PHP/releases/tag/4.0.2)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</p>

<p align="center">
<a href="https://github.com/fabianwennink/IconCaptcha-PHP/releases"><img src="https://img.shields.io/badge/version-4.0.2-orange.svg?style=flat-square" alt="Version" /></a>
<a href="https://github.com/fabianwennink/IconCaptcha-PHP/releases"><img src="https://img.shields.io/badge/version-4.0.3-orange.svg?style=flat-square" alt="Version" /></a>
<a href="https://packagist.org/packages/fabianwennink/iconcaptcha"><img src="https://img.shields.io/packagist/v/fabianwennink/iconcaptcha.svg?style=flat-square" alt="Latest Version on Packagist" /></a>
<a href="https://fabianwennink.nl/projects/IconCaptcha/license"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="License" /></a>
<a href="https://paypal.me/nlgamevideosnl"><img src="https://img.shields.io/badge/support-PayPal-lightblue.svg?style=flat-square" alt="Support via PayPal" /></a>
Expand Down
4 changes: 2 additions & 2 deletions examples/forms/ajax-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>IconCaptcha v4.0.2 - By Fabian Wennink</title>
<title>IconCaptcha v4.0.3 - By Fabian Wennink</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=11" />
<meta name="author" content="Fabian Wennink © <?= date('Y') ?>" />
Expand All @@ -38,7 +38,7 @@
<div class="shields">
<div class="shields-row">
<a href="https://github.com/fabianwennink/IconCaptcha-PHP/releases" target="_blank" rel="noopener">
<img src="https://img.shields.io/badge/version-4.0.2-orange.svg?style=flat-square" alt="Version 4.0.2"/>
<img src="https://img.shields.io/badge/version-4.0.3-orange.svg?style=flat-square" alt="Version 4.0.3"/>
</a>
<a href="https://github.com/fabianwennink/IconCaptcha-PHP/blob/master/LICENSE" target="_blank" rel="noopener">
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT license" />
Expand Down
4 changes: 2 additions & 2 deletions examples/forms/regular-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>IconCaptcha v4.0.2 - By Fabian Wennink</title>
<title>IconCaptcha v4.0.3 - By Fabian Wennink</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=11" />
<meta name="author" content="Fabian Wennink © <?= date('Y') ?>" />
Expand All @@ -58,7 +58,7 @@
<div class="shields">
<div class="shields-row">
<a href="https://github.com/fabianwennink/IconCaptcha-PHP/releases" target="_blank" rel="noopener">
<img src="https://img.shields.io/badge/version-4.0.2-orange.svg?style=flat-square" alt="Version 4.0.2" />
<img src="https://img.shields.io/badge/version-4.0.3-orange.svg?style=flat-square" alt="Version 4.0.3" />
</a>
<a href="https://github.com/fabianwennink/IconCaptcha-PHP/blob/master/LICENSE" target="_blank" rel="noopener">
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT license" />
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>IconCaptcha v4.0.2 - By Fabian Wennink</title>
<title>IconCaptcha v4.0.3 - By Fabian Wennink</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=11" />
<meta name="author" content="Fabian Wennink © <?= date('Y') ?>" />
Expand All @@ -20,7 +20,7 @@
<div class="shields">
<div class="shields-row">
<a href="https://github.com/fabianwennink/IconCaptcha-PHP/releases" target="_blank" rel="noopener">
<img src="https://img.shields.io/badge/version-4.0.2-orange.svg?style=flat-square" alt="Version 4.0.2" />
<img src="https://img.shields.io/badge/version-4.0.3-orange.svg?style=flat-square" alt="Version 4.0.3" />
</a>
<a href="https://github.com/fabianwennink/IconCaptcha-PHP/blob/master/LICENSE" target="_blank" rel="noopener">
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT license" />
Expand Down
14 changes: 0 additions & 14 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,6 @@ public function process(): void
return;
}

// Note: JS timestamps are in milliseconds.
$currentTimestamp = Utils::getCurrentTimeInMilliseconds();
$requestTimestamp = $payload['timestamp'];
$scriptTimestamp = $payload['initTimestamp'];

// Validate the payload timestamps.
if (
($requestTimestamp > $currentTimestamp || $scriptTimestamp > $currentTimestamp) || // ensure the timestamps are older than the current time.
($scriptTimestamp > $requestTimestamp) // ensure the script init timestamp is older than the request timestamp.
) {
$this->badRequest();
return;
}

switch ($payload['action']) {
case 'LOAD':

Expand Down

0 comments on commit a001176

Please sign in to comment.