Project

General

Profile

Actions

Bug #24667

closed

reqCHash should only look at GET vars

Added by Ralf Strobel over 13 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2011-01-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

tslib_fe::reqCHash currently triggers the error "Request parameters could not be validated (&cHash empty)" whenever GET or POST vars for a plugin are present and cHash is not submitted.

I think it would make more sense only to look for presence of GET variables, since only they contribute to cHash anyway.

This behavior may be intentional, since the error of course only occurs if pageNotFoundOnCHashError is enabled. Otherwise it simply disables caching whenever a POST request is processed - which does make sense, I admit, but should probably be handled directly.

See below for an example where the current behavior became a problem for me. (I actually think it did not occur before updating from Typo3 4.3 to 4.4, but I can't say for sure).

I have a class derived from tslib_pibase that usually displays cacheable pages according to submitted GET values. I hence use cHash and have pi_checkCHash enabled, so that no double entries are generated if a user simply deletes cHash from the link. I have pageNotFoundOnCHashError enabled, so that users and search engines are not even tempted to generate different links to the same content.

However, my plugin also has a small search form and can react to POST requests (upon which it calls set_no_cache(), to tell the system this is only a one-time output).

This always resulted in the named error for me, whenever a POST request was sent, since of course it did not contain a cHash value.

Since pi_checkCHash is evaluated right in the constcuctor of tslib_pibase, I had no other solution to the problem other than this:

function _construct(){
if (t3lib_div::_POST($this->prefixId)) $this->pi_checkCHash = true;
parent::
_construct();
}
(issue imported from #M17148)

Actions #1

Updated by Alexander Opitz over 10 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.1.7)?

Actions #2

Updated by Alexander Opitz almost 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF