Skip to content

Commit

Permalink
Release version 4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianwennink authored Dec 16, 2023
2 parents b7e9807 + 7babdc9 commit efe58d2
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 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.1 or 'latest'"
placeholder: "e.g. 4.0.2"
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.1 or 'latest'"
placeholder: "e.g. 4.0.2"
validations:
required: true
- type: input
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

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

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

### Fixed
- Fixed a bug which would throw an exception when validating a challenge while having the Token option configured to be disabled.

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

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

### Fixed
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.1-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.2-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.1 - By Fabian Wennink</title>
<title>IconCaptcha v4.0.2 - 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.1-orange.svg?style=flat-square" alt="Version 4.0.1"/>
<img src="https://img.shields.io/badge/version-4.0.2-orange.svg?style=flat-square" alt="Version 4.0.2"/>
</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.1 - By Fabian Wennink</title>
<title>IconCaptcha v4.0.2 - 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.1-orange.svg?style=flat-square" alt="Version 4.0.1" />
<img src="https://img.shields.io/badge/version-4.0.2-orange.svg?style=flat-square" alt="Version 4.0.2" />
</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.1 - By Fabian Wennink</title>
<title>IconCaptcha v4.0.2 - 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.1-orange.svg?style=flat-square" alt="Version 4.0.1" />
<img src="https://img.shields.io/badge/version-4.0.2-orange.svg?style=flat-square" alt="Version 4.0.2" />
</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 src/Challenge/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public function validate(array $request): ValidationResult
}

// Verify if the captcha token is correct.
$token = $request[AbstractToken::TOKEN_FIELD_NAME] ?? null;
if (!$this->validateToken($token)) {
$token = $request[AbstractToken::TOKEN_FIELD_NAME] ?? '';
if (!is_string($token) || !$this->validateToken($token)) {
return $this->createFailedResponse('invalid-security-token');
}

Expand Down

0 comments on commit efe58d2

Please sign in to comment.