Review main Merged

86452[BUGFIX] Do not encode return url for "edit column"

Andreas Kienast CR +2 V +2 Easy +2 −2 updated 10/07/24, 16:23

Commit message

The `returnUrl` argument composed for the "Edit this column" view used
in the Page module must not be encoded, otherwise the backend will open
in itself after invoking the URL.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 810

  1. Andreas Kienast uploaded patch set 1 10/07/24, 14:39

  2. Benni Mack commented on patch set 1 10/07/24, 14:46

    Very interesting. in v12, we actually just appended &returnUrl= and included rawurlencode there as well. $pageTitleParamForAltDoc = '&recTitle=' . rawurlencode( BackendUtility::getRecordTitle('pages', $pageRecord, true) ); $editParam = '&edit[' . $this->table . '][' . implode(',', $this->getAllContainedItemUids()) . ']=edit' . $pageTitleParamForAltDoc; $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); return $uriBuilder->buildUriFromRoute('record_edit') . $editParam . '&returnUrl=' . rawurlencode($GLOBALS['TYPO3_REQUEST']->getAttribute('normalizedParams')->getRequestUri()); in v13, we use $parameters, which apparently escapes values? (and maybe we should document this?) I did not find where we use this.
  3. core-ci voted on patch set 1 V +1 10/07/24, 15:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67247

  4. Andreas Kienast commented on patch set 1 10/07/24, 15:01

    Reply

    Exactly. In v13, we pass all parameters to `buildUriFromRoute()`, which implicitly encodes the parameters, while in v12 we append the query arguments as a string. We already have a lot locations where we have similar code, you may grep for `'returnUrl' => `.
  5. Benni Mack commented on patch set 2 V +1 10/07/24, 16:03

    Published edit on patch set 1.
  6. Benni Mack voted on patch set 2 CR +1 V +1 10/07/24, 16:03

  7. Benjamin Franzke voted on patch set 2 CR +1 10/07/24, 16:14

  8. core-ci voted on patch set 2 V +1 10/07/24, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67261

  9. Benjamin Franzke voted on patch set 2 CR +2 V +2 10/07/24, 16:23

  10. Benjamin Franzke merged patch set 3 10/07/24, 16:23