typo3typo3-4.5

Typo3 website - Strange characters concatenated to my URLs


I have a Typo3 website version 4.5. I just realized that when I click on the links in my website sometimes strange characters are appended to the URL of that webpage in the browser.

The website has two languages: Spanish and English. An example of correct URL is:

In Spanish -> http://mysite/index.php?id=10

In English -> http://mysite/index.php?id=10&L=2

But sometimes I get something like this:

In Spanish -> http://mysite/index.php?id=10&L=txtnpoyrf or http://mysite/index.php?id=10&L=2%20\\%27

In English -> http://mysite/index.php?id=10%20\\%27&L=2

The content is showed correctly and if I navigate just in English URLs are displayed correctly. Why could this be happening? How could I fix it?

Thanks.


Solution

  • I had the same problem on some sites, where some spambots(?) tried to inject spamlinks into the site by using the L parameter.

    When TYPO3 is configured to have the parameter Las variable for your language UIDs, then it by default accepts anything (also strings) as valid arguments. TYPO3 then just adds the given argument for the L parameter to the output and also caches all entries in the local cache.

    To avoid this, you can force TYPO3 to only accept integers as valid L arguments.

    config.linkVars = L(int)
    

    Make sure you clean the TYPO3 cache after you added the settings described above.