Project

General

Profile

Actions

Feature #99585

open

Add Upgrade Wizard for Apache htaccess files

Added by Oliver Hader over 1 year ago. Updated 12 months ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Install Tool
Start date:
2023-01-17
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
On Location Sprint

Description

  • (for instance)
  • check state of fileadmin/.htaccess and compare with current version provided in TYPO3
  • offer diff view and/or possibility to override or deny (for CLI)

Files

99585.png (82.4 KB) 99585.png Oliver Hader, 2023-01-23 18:19
Actions #1

Updated by Oliver Hader over 1 year ago

  • Assignee set to Oliver Hader
Actions #2

Updated by Christian Kuhn over 1 year ago

  • Status changed from New to Needs Feedback

The "Directory Status" module in the install tool was / is designed to deal with stuff like this.

Actions #3

Updated by Oliver Hader over 1 year ago

That's how it the install tool current "deals with it" in TYPO3 v12...

Actions #4

Updated by Benni Mack over 1 year ago

  • Target version changed from 12.2 to 12.3
Actions #5

Updated by Benni Mack over 1 year ago

  • Target version changed from 12.3 to 12 LTS
Actions #6

Updated by Benni Mack over 1 year ago

  • Target version changed from 12 LTS to Candidate for Major Version
Actions #7

Updated by Oliver Hader over 1 year ago

  • Assignee deleted (Oliver Hader)

Would be a nice enhancement, but I don't have time for working on this...

Actions #8

Updated by Oliver Hader over 1 year ago

  • Status changed from Needs Feedback to Accepted
Actions #9

Updated by Benni Mack 12 months ago

  • Sprint Focus set to On Location Sprint
Actions #10

Updated by Stephan Jorek 12 months ago

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.

  1. Mark (.htaccess) file candidates that could be handled by this feature in TYPO3\CMS\Install\FolderStructure\DefaultFactory::getDefaultStructureDefinition()
  2. 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 utilising sebastian/diff
  3. 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
  4. Implement unit-tests to ensure the above changes are working
  5. Implement an update-wizard which utilises TYPO3\CMS\Install\FolderStructure\DefaultFactory to 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.
  6. Take care about the following implementations, which are using TYPO3\CMS\Install\FolderStructure\DefaultFactory
    • TYPO3\CMS\Install\Command\SetupCommand
    • TYPO3\CMS\Install\Controller\InstallerController
    • TYPO3\CMS\Install\Service\CoreUpdateService
Actions

Also available in: Atom PDF