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

Enable MySQL Strict mode as best practise and security improvement #9920

Open
mattab opened this issue Mar 13, 2016 · 2 comments
Open

Enable MySQL Strict mode as best practise and security improvement #9920

mattab opened this issue Mar 13, 2016 · 2 comments
Labels
c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github.

Comments

@mattab
Copy link
Member

mattab commented Mar 13, 2016

The goal of this issue is to enable MySQL strict mode in Piwik.

Why enabling Strict mode?

  • MySQL strict mode is a setting that implements a best practise around data management
  • MySQL strict mode results in better security for Piwik users. Why? Currently as we are not using Strict mode, sometimes values with special unicode characters could be automatically truncated before being inserted. Why is data truncation a possible security issue? when values are truncated before being inserted in the DB, this can open up the application to certain vulnerabilities such as XSS, under special circumstances. For example see this XSS in Wordpress (tldr; mysql → special characters → truncation → input validation → output sanitisation → xss → time to update WordPress.)

We would like to bring the best security practises to Piwik and strict mode would be a valuable security improvement.

Requirements

(also refs Require Mysql 5.5 #9107 and making utf8mb4 the collation by default #9785)

@mattab mattab added the c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github. label Mar 13, 2016
@mattab mattab added this to the 3.0.0 milestone Mar 13, 2016
@Patta
Copy link

Patta commented May 5, 2020

+1

@tsteur
Copy link
Member

tsteur commented Jan 3, 2024

If you can think of a way to exploit this, please report the issue via https://hackerone.com/matomo/ for a bounty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github.
Projects
None yet
Development

No branches or pull requests

3 participants