[Catalyst] Re: Supressing passwords in debug messages
Byron Young
Byron.Young at riverbed.com
Sat Jan 17 02:38:46 GMT 2009
Byron Young wrote on 2009-01-12:
>
> J. Shirley wrote on 2009-01-12:
>> On Mon, Jan 12, 2009 at 2:35 PM, Byron Young
>> <Byron.Young at riverbed.com> wrote:
>>> J. Shirley wrote on 2009-01-12:
>>>> On Mon, Jan 12, 2009 at 10:45 AM, Byron Young
>>>> <Byron.Young at riverbed.com> wrote:
>
> [snip]
>
>>>> The patch I'm creating needs to be configured in some way, I am
>>>> thinking at this point it can be configured as follows:
>>>>
>>>> package MyApp;
>>>>
>>>> __PACKAGE__->config(
>>>> 'Debug' => {
>>>> skip_dump_parameters => 1, # Simply don't render the
>>>> parameters incoming, very shotgunny skip_dump_parameters => [
>>>> qw/password/ ], # Show '(redacted
>>>> by
>>>> config)' as the value of these fields
>>>> }
>>>> );
>>>>
>>>> I'll need to bake tests for this, which there are currently no tests
>>>> for handling the dumping of parameters so it will be a bit more. If
>>>> someone wants to help with that, let me know and I can help guide.
>>>>
>>>> -J
>>>>
>>>
>>> I'd be happy to write some unit tests. I haven't worked with
> any
>> of the Catalyst unit tests before so I'm not sure what the process is
>> like for getting the code, setting up the test environment, making and
>> submitting changes and unit tests, etc. Is there a doc you can point
>> me to? I don't see anything in the manual or wiki.
>>>
>>> Byron
>>>
>>> Mostly it is just checking out the code from svn and starting.
> The
>> patch that I've started is at http://scsys.co.uk:8001/22410 - you can
>> apply this to a svn checkout of
>> http://dev.catalystframework.org/repos/Catalyst/Catalyst- Runtime/5.70
>>
>> It doesn't have the actual testing part, just a stub. I'll be working
>> on it more over today and tomorrow when I get free moments, but they're
>> few and far between.
>>
>
> Ditto on the lack of free time. I'll check it out and let you know
> what I come up with.
>
> byron
>
J Shirley - I finally got a chance to look at this today. You did most of the work for me. I just updated the unit test, changed the 'skip_dump_parameters' parameter to 'redact_parameters', and expanded the log_parameters() documentation a bit. I also added a section to the cookbook explaining how to use the parameter.
Attached are two patches:
redact-patch.diff - patch containing the new unit test and changes to Catalyst.pm.
cookbook-patch.diff - patch containing a new cookbook section on this feature, for the Catalyst-Manual repository
Anything else I need to do?
Byron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redact-patch.diff
Type: application/octet-stream
Size: 4631 bytes
Desc: redact-patch.diff
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090116/f04e9141/redact-patch.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cookbook-patch.diff
Type: application/octet-stream
Size: 999 bytes
Desc: cookbook-patch.diff
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090116/f04e9141/cookbook-patch.obj
More information about the Catalyst
mailing list