I wrote a little module that allows to disable access to some webfm folders based upon the users IP. We needed this for our institutes website where only students from within the universities IP Range are supposed to be allowed to download from certain folders.
This is partly based upon ipAuthenticator.
For security you must also consider the small patch to webfm.module - for some reason it is possible to bypass invoking the webfm_send-hook. I don't know why, but its likely that it was not intended that this could be done by a url call.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | webfm_ipfolder.tar.gz | 5.44 KB | nhck |
| webfm_menu_callback.patch | 597 bytes | nhck | |
| webfm_ipfolder.tar.gz | 3.93 KB | nhck |
Comments
Comment #1
robmilne commentedHi Niels,
Thanks for your excellent module. I haven't been actively maintaining WebFM lately due to lack of time and so I greatly appreciate help from people who add improvements. Thanks also for the patch. I write myriad kinds of software so I cannot remember what the purpose of the bypass var was except to provide streaming for the "alternative streaming". Doesn't make much sense to me now either so I will remove.
I can add your module to the 'modules' folder of WebFM but it will be impossible for you to directly maintain without my cvs pw - maintenance via patch submission only. The other option is for you to get a cvs account and create your own project (I can link to it on the WebFM project page). The choice is yours.
-rob
Comment #2
nhck commentedIt does make some sense if you write a module that uses the webfm_send-hook and you would like to call webfm_send_file from within it to actually stream the file. But in my opinion it shouldn't be possible to bypass the hook directly through the url.
Other than that I am fine with adding the module to the modules-folder of webfm.
Comment #3
nhck commentedMaybe we can have this ported in a Development snapshot, and provide it here: http://drupal.org/project/webfm to get some feedback.
Comment #4
robmilne commentedHi Niels,
I hope to get back to some webfm maintenance in the near future if my schedule slows down as I'm expecting. There is a large backlog of issues which will probably take more than a few days to deal with - especially since my php-js skills have atrophied with disuse.
-rob
Comment #5
robmilne commentedHi Niels,
Would you mind taking the time to add a hook_help function to clarify usage?
-rob
Comment #6
robmilne commentedin head
Comment #7
nhck commentedRob - I have to admit I had forgotten about your request. Sorry..
Some changes I made:
Comment #8
robmilne commentedThanks Niels. I'll update head but I'm actually in the process of giving the module away and may not do another release - time is too limited in one lifetime to do everything. I have to focus on other projects.
Are you are interested in taking the module over?
Comment #9
robmilne commentedIn head