-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove sensitive shared_secret data from occ config:list output #31984
Conversation
My patch had a code-style fail. I pushed a 2nd commit that has the little code-style fix and unit tests. |
It would be nice to have acceptance tests for |
@phil-davis, in this case, would unit tests not be more suitable? |
Yes, unit tests are good - they check that the underlying classes/methods do the right thing. Acceptance tests check that the actual |
@settermjd this PR has been started from a very old You should pull |
This patch ensures that log.condition shared_secret sensitive value are removed from config:list output.
a224b74
to
2607fce
Compare
Codecov Report
@@ Coverage Diff @@
## master #31984 +/- ##
============================================
+ Coverage 63.49% 63.51% +0.02%
- Complexity 18545 18549 +4
============================================
Files 1167 1167
Lines 69544 69548 +4
Branches 1264 1264
============================================
+ Hits 44154 44173 +19
+ Misses 25021 25006 -15
Partials 369 369
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
'shared_secret' => true, | ||
] | ||
], | ||
'log.conditions' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the feeling that this was already in place but was missing the "s", see line 52.
AFAIK there is no setting called singular "log.condition", see config.sample.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.condition
is still backward-compatible supported. See lib/private/Log.php
function log
- the first few lines check log.conditions
andd then fall back to log.condition
Please backport |
Backport |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This PR applies a patch from @phil-davis, that ensures that
log.condition
shared_secret
sensitive data is removed from calls toocc config:list
output.Motivation and Context
If you had the above configuration in
config/config.php
, then theshared_secret
information would not be stripped, from the output of a call toocc config:list
. However, with the PR applied, the output would appear as follows:How Has This Been Tested?
Currently, it's only been manually tested.
Types of changes
Checklist:
Open tasks: