From c0c6fa98b29bf7ba442a714038004015ad44f003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ru=C5=BEevi=C4=87?= Date: Tue, 2 Jul 2024 10:37:50 +0200 Subject: [PATCH] adding additional header check (#430) --- CHANGELOG.md | 6 ++++++ eightshift-forms.php | 2 +- package-lock.json | 6 +++--- src/Geolocation/Geolocation.php | 5 +++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93f83dbd..434c6064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/). +## [4.0.2] + +### Fixed +- Geolocation added additional check for sent headers. + ## [4.0.1] ### Fixed @@ -418,6 +423,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a - Initial production release. +[4.0.2]: https://github.com/infinum/eightshift-forms/compare/4.0.1...4.0.2 [4.0.1]: https://github.com/infinum/eightshift-forms/compare/4.0.0...4.0.1 [4.0.0]: https://github.com/infinum/eightshift-forms/compare/3.1.12...4.0.0 [3.1.12]: https://github.com/infinum/eightshift-forms/compare/3.1.11...3.1.12 diff --git a/eightshift-forms.php b/eightshift-forms.php index cb932d8f..a91b3a0b 100644 --- a/eightshift-forms.php +++ b/eightshift-forms.php @@ -6,7 +6,7 @@ * Description: Eightshift Forms is a complete form builder plugin that utilizes modern Block editor features with multiple third-party integrations, bringing your project to a new level. * Author: WordPress team @Infinum * Author URI: https://eightshift.com/ - * Version: 4.0.1 + * Version: 4.0.2 * Text Domain: eightshift-forms * * @package EightshiftForms diff --git a/package-lock.json b/package-lock.json index 07b0be23..dbb82275 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,16 +9,16 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@eightshift/frontend-libs": "https://github.com/infinum/eightshift-frontend-libs.git#develop", + "@eightshift/frontend-libs": "^12.0.0", "autosize": "^6.0.1", "choices.js": "^10.2.0", "dropzone": "^6.0.0-beta.2", "flatpickr": "^4.6.13", - "reactflow": "^11.10.4" + "reactflow": "^11.11.3" }, "devDependencies": { "husky": "^9.0.11", - "webpack": "^5.90.2", + "webpack": "^5.91.0", "webpack-cli": "^5.1.4" } }, diff --git a/src/Geolocation/Geolocation.php b/src/Geolocation/Geolocation.php index a39a04c1..2ad9afac 100644 --- a/src/Geolocation/Geolocation.php +++ b/src/Geolocation/Geolocation.php @@ -58,6 +58,11 @@ public function setNormalLocationCookie(): void return; } + // Bailout if headers are already sent usually triggered by crawler bots. + if (headers_sent()) { + return; + } + try { $cookieValue = $this->getUsersGeolocation();