Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL parameter sanitization #310

Open
nvindice opened this issue Aug 7, 2023 · 7 comments
Open

URL parameter sanitization #310

nvindice opened this issue Aug 7, 2023 · 7 comments

Comments

@nvindice
Copy link
Contributor

nvindice commented Aug 7, 2023

Hi, I'm not sure where to post this best, so I created an issue here at the core package. Affected version is at least 2021.10 on TYPO3.

Additionally, I'm not sure where this problem comes from - I guess it's caching related.

Google stores a dozen URLs to our shop with additional parameters like ?currency=EUR"'`--)&locale=de&site=default. To me, this looks like somebody tried out SQL injections which was somehow cached and then later discovered by Google.

How to get rid of these "dirty" links?

@aimeos
Copy link
Owner

aimeos commented Aug 7, 2023

Yes, that looks like SQL injection attempts

@nvindice
Copy link
Contributor Author

nvindice commented Aug 7, 2023

Shouldn't the parameters be sanitized before they are used for URL generation and then cached? I don't care for unsuccessful hacking attempts, but I don't want them to be part of our Google search results.

@aimeos
Copy link
Owner

aimeos commented Aug 7, 2023

How did you add the language/currency selection and what's the URL of your site?

@nvindice
Copy link
Contributor Author

nvindice commented Aug 7, 2023

We don't have a language/currency selection. URL: belago*de

@aimeos
Copy link
Owner

aimeos commented Aug 7, 2023

What are the URLs which contain that parameters?

@nvindice
Copy link
Contributor Author

nvindice commented Aug 7, 2023

Currently hopefully none, we cleared the cache and reset Google's index. Yesterday Google (!) listed a couple of pages like this:
https://belago*de/c/Unsere_Beststeller~22?ai[currency]=EUR%22%27`--)&ai[locale]=de&ai[site]=default&currency=EUR%22%27`--)&locale=de&site=default

@jonaseberle
Copy link
Contributor

I think it is related to them parameters being excluded from cHash validation:

In aimeos/aimeos-typo3:

https://github.com/aimeos/aimeos-typo3/blob/master/ext_localconf.php#L274-L278

I suggest to review that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants