Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This anonymise filter is used in the system check page where the user can copy an anonymised version of the system report.
I noticed for example should the DB prefix be
matomo_
and the DB user bematomo
, then the system check would actually sayDB Prefix: $DB_USERNAME_
and thus exposing that the DB username ismatomo
. In a similar way if say the DB host islocalhost
, and some value in the system check page includeslocalhost
when this would be replaced with$DB_HOST
and therefore exposing the host.I now changed it to an equals so
$DB_USERNAME
or$DB_HOST
will only be shown when the value matches, not contains. This can be still an issue though eg when the DB prefix ismatomo
or a value in the system check page islocalhost
. So maybe we should actually just remove the replacement of these DB related variables to not accidentally leak any information. Will change this in the following commit to no longer do any such replacement.I guess it was there just in case someone would add print DB User in a system check entry or through some kind of backtrace or something but thinking about it, it should not be an issue.
Review