---
title: "Deprecation: #109544 - GeneralUtility::sanitizeLocalUrl() needs PSR-7 request"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-109544-1775761298"
source: "Changelog/14.3/Deprecation-109544-GeneralUtilitySanitizeLocalUrlWithoutRequest.rst"
typo3-version: "14.3"
typo3-major: 14
type: "deprecation"
issue: 109544
forge: "https://forge.typo3.org/issues/109544"
tags: ["PHP-API", "FullyScanned", "ext:core"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Deprecation: #109544 - GeneralUtility::sanitizeLocalUrl() needs PSR-7 request {#deprecation-109544-1775761298}

See [forge#109544](https://forge.typo3.org/issues/109544)

## Description {#description}

Calling `\TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl()` without
passing the current PSR-7 request as the second argument is deprecated. The method
previously resolved host and site information via
`\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv()`, which falls back to server superglobals.
Passing the request explicitly allows the method to read this information from
`\TYPO3\CMS\Core\Http\NormalizedParams` instead.

## Impact {#impact}

Calling `\TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl()`
with only one argument triggers a PHP `E_USER_DEPRECATED` error.

## Affected installations {#affected-installations}

All installations that call
`\TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl()` without
passing a `\Psr\Http\Message\ServerRequestInterface` as the second argument.

The extension scanner will detect affected usages as a strong match.

## Migration {#migration}

Pass the current PSR-7 request as the second argument:

```diff
use TYPO3\CMS\Core\Utility\GeneralUtility;

- $url = GeneralUtility::sanitizeLocalUrl($url);
+ $url = GeneralUtility::sanitizeLocalUrl($url, $request);
```
