CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #32399

Conflict with EXT:nc_staticfilecache -> No secured links

Added by Andy Grunwald over 1 year ago. Updated 9 months ago.

Status:Rejected Start date:2011-12-08
Priority:Should have Due date:
Assignee:- % Done:

80%

Category:-
Target version:-
Votes: 0

Description

If you have a TYPO3 installation and both extensions EXT:nc_staticfilecache [1] and naw_securedl there will be a "conflict".

nc_staticfilecache is an extension to cache TYPO3 pages staticly as HTML files to typo3temp/tx_ncstaticfilecache (only if the page is static cachable (fe. no backend user logged in, no fe user logged in, and so on ...).
This extension use the hook '$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['insertPageIncache']' to write this static file.

naw_securedl use '$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output']' to secure the links.

In a typical TYPO3 FE rendering process, the hook ['tslib/class.tslib_fe.php']['insertPageIncache'] is called BEFORE ['tslib/class.tslib_fe.php']['contentPostProc-output']. This will produce the following behaviour:

On the first hit at the page (not cached yet), nc_staticfilecache will write a static file to disk and naw_securedl will secure the links and TYPO3 display the content.
On the second hit to this page TYPO3 isn`t affected anymore, because .htaccess detected a static will and will deliver it. naw_securedl don`t have any chance to secure the cached links anymore.

What is the solution?
The solution is quite easy. nc_staticfilecache has a hook to change the status is the cache is cachable. The attached patch introduce a new file in naw_securedl which use the hook from nc_staticfilecache to check if there a links on the rendered page which need to secure.
If this is the case, don`t cache the page staticly. If there are no links to secure, the page could be cached.

I don`t know if it is a good way to place this hook into the naw_securedl core. If you don`t apply this patch, drop me a message, so i will create a new extension to solve this problem.

[1] http://typo3.org/extensions/repository/view/nc_staticfilecache/current/

patch.diff (5.2 kB) Andy Grunwald, 2011-12-08 16:03

History

Updated by Helmut Hummel 9 months ago

  • Status changed from New to Rejected

I would say that this hook should go into nc_staticfilecache or another extension.

Thanks anyway for the report and the solution.

Also available in: Atom PDF