#99585Add Upgrade Wizard for Apache htaccess files
Description
- (for instance)
- check state of
fileadmin/.htaccessand compare with current version provided in TYPO3 - offer diff view and/or possibility to override or deny (for CLI)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[FEATURE] Add Upgrade Wizard for Apache htaccess files Resolves: #99585 Releases: main
Files 1
History 12
-
Oliver Hader changed assigned to Oliver Hader <span data-processor="relativetime" data-value="2023-01-17T20:10:36+00:00" > 01/17/23, 20:10 </span>
-
Christian Kuhn commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2023-01-23T18:06:40+00:00" > 01/23/23, 18:06 </span> -
Oliver Hader commented and changed attached 99585.png <span data-processor="relativetime" data-value="2023-01-23T18:21:31+00:00" > 01/23/23, 18:21 </span>
That’s how it the install tool current “deals with it” in TYPO3 v12…
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2023-02-08T16:02:59+00:00" > 02/08/23, 16:02 </span>
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2023-04-05T09:52:58+00:00" > 04/05/23, 09:52 </span>
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2023-04-05T09:54:51+00:00" > 04/05/23, 09:54 </span>
-
Oliver Hader commented and changed removed the assignee <span data-processor="relativetime" data-value="2023-04-05T14:33:44+00:00" > 04/05/23, 14:33 </span>
Would be a nice enhancement, but I don’t have time for working on this…
-
Oliver Hader changed status
Needs FeedbackAccepted <span data-processor="relativetime" data-value="2023-04-05T14:34:19+00:00" > 04/05/23, 14:34 </span> -
Benni Mack changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2023-08-02T13:10:19+00:00" > 08/02/23, 13:10 </span>
-
Stephan Jorek commented <span data-processor="relativetime" data-value="2023-08-06T12:21:29+00:00" > 08/06/23, 12:21 </span>
Hey folks,
after discussing a little bit with some core-devs (during the T3DD2023 coding-night), a wanted to sum up what we’ve analysed so far.
- Mark (.htaccess) file candidates that could be handled by this feature in
TYPO3\CMS\Install\FolderStructure\DefaultFactory::getDefaultStructureDefinition() - Update the implementation used in
TYPO3\CMS\Install\Controller\EnvironmentController::folderStructureGetStatusAction()to show a green badge, if the marked files from (1.) are either unchanged or only contain (line-based) additions (but no changes).- This ensures that custom rules don’t lead to false positives (ie. where rules have been added to
public/.htaccess) - This should be implemented in
TYPO3\CMS\Install\FolderStructure\FileNode, probably utilisingsebastian/diff
- This ensures that custom rules don’t lead to false positives (ie. where rules have been added to
- Update
TYPO3\CMS\Install\FolderStructure\FileNode::fixSelf()adding a additional section which deals with changed files, propably by creating backup files and restoring the desired file contents - Implement unit-tests to ensure the above changes are working
- Implement an update-wizard which utilises
TYPO3\CMS\Install\FolderStructure\DefaultFactoryto reset the changed files as described above. Of course after the user has given confirmation, probably after presenting a unified diff to the user first. - Take care about the following implementations, which are using
TYPO3\CMS\Install\FolderStructure\DefaultFactoryTYPO3\CMS\Install\Command\SetupCommandTYPO3\CMS\Install\Controller\InstallerControllerTYPO3\CMS\Install\Service\CoreUpdateService
- Mark (.htaccess) file candidates that could be handled by this feature in
-
Georg Ringer changed Sprint Focus
On Location Sprint<span data-processor="relativetime" data-value="2026-08-06T15:48:13+00:00" > 08/06/26, 15:48 </span> -
Benni Mack commented and changed status
AcceptedNeeds Feedback <span data-processor="relativetime" data-value="2026-11-19T11:09:15+00:00" > 11/19/26, 11:09 </span>We’d also need to detect if we deal with a modified htaccess file. Other systems (ansible, etc) add markers to know which parts/lines were autogenerated but at the same time, we could also check for checksums, and see if we could update them like this?
We could even have a version number in the first line? “TYPO3 htaccess v1” so we know what to update from and to.
Looking at this feature, this is really tricky, and we really need to be careful to do the changes, and it feels like a custom project / library to do so.
The “Directory Status” module in the install tool was / is designed to deal with stuff like this.