Closed (fixed)
Project:
chmod
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2015 at 15:46 UTC
Updated:
11 Jul 2022 at 00:09 UTC
Jump to comment: Most recent
Hi!
This seems like an interesting module.
I encourage you to create a dev release several days/weeks before a stable (and to create a "1.0-beta1" before a 1.0). Once you create the dev, please comment on this issue so that people following this issue can take a look at the code/purpose and perhaps give some feedback.
My interest: The purpose of the module from the project page seems useful to me in certain situations, but I can also see that there are risks to the implementation (anytime you call exec there are risks). Hence wanting to get a quick look at the code.
This issue is not a demand or requirement, just a friendly suggestion of what I've seen work well in the past.
Comments
Comment #2
c-logemannHello @greggles,
it's my own interest to get this module as secure as I can. So any reviews especially by the security team are helpful. I'm fine your suggested version strategy and announcements in this issue and I will follow this way.
Greetings,
Carsten
Comment #4
c-logemannI have a concrete question about security. Currently I check the path with "file_exists". Is this enough or should I do more checking of path-infomration before using it in exec()?
Hereis the example code. But it's part of the code I committed today and you can start to review.
On the next step I will create an interface to drush via menu_router. The access to this I want to protect with the same token which is used for "cron.php".
Comment #5
c-logemannJust committed a feature to use this module like cron.php with cron_key in url. There is also a new global setting setting page to enable this feature. The execution form is moved to a new url and defined as MENU_LOCAL_TASK. Now the cron implementation is prepared.
Comment #7
c-logemannI created a dev release today.
Comment #8
gregglesI reviewed the code and didn't see any immediately obvious ways to exploit it. Any reason you aren't using escapeshellarg?
Comment #9
c-logemannThanx @greggles for reviewing.
When I think about a SQL Injection by another vulnerability I think somebody can change the private files path for example and so get a string to the exec() command. So hardening the exec()-situation was still a task for me and "escapeshellarg" I need to test. When there is a problem then I report here if not I will use and commit this.
Comment #10
c-logemannComment #12
c-logemannComment #14
gregglesAny reason to use the ! placeholder instead of % in the t calls? I think it's safer to do % unless you know you absolutely need to use !.
Comment #16
c-logemannI have changed this. I think I can make a release now.
Comment #17
c-logemannBecause there was no other comment on review I created a first stable release.