mirror of
https://github.com/DanielSiepmann/tracking.git
synced 2024-11-21 21:46:09 +01:00
Do not create error in Symfony Expression Language on missing User Agent
This commit is contained in:
parent
7f63ae8262
commit
3b0fb209c2
3 changed files with 42 additions and 1 deletions
|
@ -59,6 +59,7 @@ services:
|
|||
$rule: >
|
||||
not (context.getAspect("backend.user").isLoggedIn())
|
||||
and not (context.getAspect("frontend.preview").isPreview())
|
||||
and request.getHeader("User-Agent")[0]
|
||||
and not (request.getHeader("User-Agent")[0] matches "/^TYPO3|TYPO3 linkvalidator/")
|
||||
and not (request.getHeader("User-Agent")[0] matches "/Wget|curl|Go-http-client/")
|
||||
and not (request.getHeader("User-Agent")[0] matches "/Googlebot|Bingbot|bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Sogou|Exabot|NextCloud-News|Feedly|XING FeedReader|CCBot|SemrushBot|SEOkicks|Twitterbot|Seekport Crawler|SemanticScholarBot|ia_archiver|PaperLiBot|TrendsmapResolver|AhrefsBot|Nuzzel/")
|
||||
|
|
40
Documentation/Changelog/1.1.6.rst
Normal file
40
Documentation/Changelog/1.1.6.rst
Normal file
|
@ -0,0 +1,40 @@
|
|||
1.1.6
|
||||
=====
|
||||
|
||||
Breaking
|
||||
--------
|
||||
|
||||
Nothing
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
Nothing
|
||||
|
||||
Fixes
|
||||
-----
|
||||
|
||||
* Do not break Symfony Expression Language in case no user agent is provided.
|
||||
Some requests might ommit the user agent header.
|
||||
The default configuration for tracking pageviews would result in an error raised
|
||||
from Symfony Expression Language.
|
||||
|
||||
This got fixed as the existence is checked first, before comparing against agents
|
||||
that should not be tracked.
|
||||
|
||||
You should check your own rules if you defined any, see: :ref:`pageview` as well as
|
||||
:ref:`recordview`.
|
||||
|
||||
The raised error looks like this on my own website:
|
||||
|
||||
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 2 passed to Symfony\Component\ExpressionLanguage\Node\BinaryNode::evaluateMatches() must be of the type string, null given, called in vendor/symfony/expression-language/Node/BinaryNode.php on line 167 | TypeError thrown in file vendor/symfony/expression-language/Node/BinaryNode.php in line 176. Requested URL: https://daniel-siepmann.localhost/
|
||||
|
||||
Tasks
|
||||
-----
|
||||
|
||||
Nothing
|
||||
|
||||
Deprecation
|
||||
-----------
|
||||
|
||||
Nothing
|
|
@ -11,7 +11,7 @@ $EM_CONF[$_EXTKEY] = [
|
|||
'author' => 'Daniel Siepmann',
|
||||
'author_email' => 'coding@daniel-siepmann.de',
|
||||
'author_company' => '',
|
||||
'version' => '1.1.2',
|
||||
'version' => '1.1.6',
|
||||
'constraints' => [
|
||||
'depends' => [
|
||||
'core' => '',
|
||||
|
|
Loading…
Reference in a new issue