Skip to content
Snippets Groups Projects
  1. Sep 28, 2023
    • Stefan Bürk's avatar
      [BUGFIX] Avoid redirect loop for empty redirect url · 158a2125
      Stefan Bürk authored
      Sending a redirect response with a empty `Location` is
      invalid per RFC. Browser vendor are dealing differntly
      with it.
      
      * Firefox executes a redirect to the current url, leading
        to an `endless` redirect chain - stopping it after some
        recursions with a coresponding notice in the network tab.
      * Chrome determines this and is doing nothing at all with
        it - leading to a white page.
      
      From the [1] RFC regarding invalid URI spec for `Location`:
      
      > Note: Some recipients attempt to recover from Location
      >       fields that are not valid URI references. This
      >       specification does not mandate or define such
      >       processing, but does allow it for the sake of
      >       robustness.
      
      A matching redirect record with a manually entered `/` as
      redirect target leads in TYPO3 v11 to this behaviour. This
      can be mitigated by selecting the corresponding site root.
      
      For TYPO3 v12 and upwards a change in the LinkHandling has
      been introduced which properly handles the `/` in the link
      generation and correctly returning a `/` as redirect url.
      That change has quite some impact and is not reasonable to
      be backported to TYPO3 v11 within #100958.
      
      This change adds an additionally guard to the `RedirectHandler`
      to handle empty redirect urls as endless loop, just logging
      it and not responding with an redirect. This helps in v11 and
      keeps a safety guard for the future in this place.
      
      [1] https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.2
      
      Resolves: #100791
      Related: #100958
      Releases: main, 12.4, 11.5
      Change-Id: I2af2d5bf759a277ade45bd0f7740ffe0099003b3
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81280
      
      
      Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
      158a2125
  2. Sep 27, 2023
  3. Sep 26, 2023
  4. Sep 25, 2023
  5. Sep 22, 2023
  6. Sep 21, 2023
  7. Sep 20, 2023
  8. Sep 18, 2023
  9. Sep 14, 2023
  10. Sep 12, 2023
  11. Sep 10, 2023
  12. Sep 09, 2023
  13. Sep 08, 2023
  14. Sep 07, 2023
  15. Sep 06, 2023
  16. Sep 05, 2023
  17. Sep 03, 2023
  18. Sep 01, 2023
  19. Aug 31, 2023
  20. Aug 30, 2023
    • Oliver Hader's avatar
      [BUGFIX] Fix several undefined array key issues in DataHandler scope · c9873d5e
      Oliver Hader authored
      DataMapProcessor tries to access `$possibleChainedIds[0]` which
      might not be defined, since that array is the result of a previous
      `array_intersect` invokation, which keeps the array keys of the
      original input array.
      
      DataHandler tries to access `$this->copyMappingArray[$table][$uid]`,
      which might not be defined in case the previous copy command could
      not be executed (e.g. since the record was deleted already).
      
      Resolves: #101748
      Releases: main, 12.4, 11.5
      Change-Id: Ibcbc412c7df62ce17dfa2c0f6fc120ccebb953d8
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80669
      
      
      Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
      Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
      Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      c9873d5e
    • Robert Kärner's avatar
      [BUGFIX] Generate correct asset symlinks on Windows · 3e884ce6
      Robert Kärner authored
      This patch fixes two issues when generating symlinks to the public
      extension resources (Public/Resources) into the _assets folder during
      Composer installation.
      
      First, directory symlinks can't be created the same way on Windows as
      on Unix platforms. The creation requires elevated rights, and the
      required command is named differently as well. Junctions should be used
      on Windows instead, because they do not need elevated privileges to be
      created.
      
      When installing a TYPO3 extension via Composer, its Resources/Public
      folder is getting symlinked to the publicly accessible _assets folder.
      Until now, this process only used the Unix specific functions provided
      by Composer. It did not create any symlinks on Windows based
      installations, without generating any error message.
      
      This patch adds the same checks and platform-specific functions used by
      Composer when symlinking packages from a local path repository.
      
      The second issue that has been addressed is the naming of the symlinks
      themselves. When a Resources/Public directory is symlinked into the
      _assets folder, the symlink will be named using an md5 hash based on
      parts of the extension's installation path on the filesystem. During
      Composer installation, this relative path is derived from the
      absolute path provided by Composer. As Windows uses a different default
      path separator (backslash) compared to Unix (forward slash), the
      relative path will be different between both platforms, resulting in a
      different md5 hash being generated.
      
      Absolute path on Unix:
      /path/to/typo3/vendor/mycompany/myext
      
      Absolute path on Windows:
      C:\path\to\typo3\vendor/mycompany/myext
      
      Relative path to be used for the hash on Unix:
      /vendor/mycompany/myext
      
      Relative path to be used for the hash on Windows:
      \vendor/mycompany/myext
      
      If an uri into the _assets folder is to be generated in either frontend
      or backend, the md5 hash will be always be generated by using forward
      slashes, resulting in incorrect links on Windows installations.
      
      This difference has been solved by replacing all backslashes in the
      absolute extension installation path into forward slashes on Windows
      installations, so the symlink will be named correctly from the
      beginning.
      
      Resolves: #98434
      Resolves: #98447
      Releases: main, 12.4, 11.5
      Change-Id: I221eb538312302a7af4f7c3010c9982922f1c6ce
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80753
      
      
      Reviewed-by: default avatarStefan B�rk <stefan@buerk.tech>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Tested-by: default avatarStefan B�rk <stefan@buerk.tech>
      3e884ce6