chrisspen/django-chroniker

Setting to disable raw_command

LaurensBosscher opened this issue · 5 comments

Hi!

In case less trusted parties have access to the Django Admin the 'raw_command' option is a huge vulnerability.

Would you accept a pull-request that allows this option to be disabled through the Django settings?

Sure, that seems reasonable.

would it be possible to make a multiple step activation? Or a mandatory admin notification in case a new raw_command task is created or modified...

Just about anything's possible, but I'd imagine that would require more work and probably an additional model. Since it's likely you're the only one that would use it, I'd recommend against over complicating it.

@diegofcoelho

For our use case simple disabling it would be enough but I reckon it would be easy to extend on that after the pull request if you would like to have that functionality.

I'll try to start working on that this weekend, I hope to have a pull request by monday.

Just a quick update, I've a branch with the changes. We'll test it in one of our projects next week and do an internal security review before submitting it as a pull-request.

I've decided to minimize the changes to the core code, so the diff is very readable. If someone is interested please take a look here: master...LaurensBosscher:DISABLE_RAW_COMMAND