Ticket #1032 (new Module Submissions)

Opened 4 years ago

Last modified 2 months ago

tftp upload module

Reported by: Gunther Assigned to:
Priority: minor Milestone: Cut Line
Component: Other Module Version:
Keywords: TFTPboot Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

A page for uploading files into the tftpboot dir. so to make easier loading up of new firmware to a system and to upload phone config files.

Attachments

tftpmanager-1.0.0.3.tgz (98.1 kB) - added by tylerwinfield on 06/21/10 12:09:37.
tftpmanager-1.1.0.0.tgz (96.7 kB) - added by tylerwinfield on 06/23/10 13:00:06.
fixes to security problems noted in comments, removed unnecessary scripting

Change History

07/17/06 20:20:58 changed by gregmac

  • summary changed from Module Request to tftp upload module.

07/17/06 20:23:25 changed by gregmac

This module should provide a user interface along with shared functions to add files to a tftp directory. The functions should be like:

  • tftp_add_file($file)
  • tftp_remove_file($file)
  • tftp_list_files()

They would be used by DevicesTakeTwo provisioning, rather than the provisioning managing a tftp directory itself.

07/24/08 18:55:44 changed by ryppn

  • confirmation set to Unreviewed.
  • engine_version changed.
  • svn_rev changed.
  • milestone set to Cut Line.

06/08/10 17:59:28 changed by tylerwinfield

summary implemented specified functions.

  • tftp_add_file($source, $destination = "")
    • /tftpboot will prepend $destination
    • if not provided, the filename substring of the $source path is used
    • returns true on success, otherwise text error message
  • tftp_remove_file($filename)
    • returns true on success, otherwise text error message
  • tftp_list_files($dir = "/tftpboot")
    • returns an array mapping of subfolders and files, false otherwise

NOTE: current version assumes TFTP server is already installed and root folder is /tftpboot

06/21/10 12:09:37 changed by tylerwinfield

  • attachment tftpmanager-1.0.0.3.tgz added.

06/22/10 08:00:35 changed by p_lindheimer

  • type changed from Feature Requests to Module Submissions.

tyler,

from a quick glance it looks like your module will run into problems from systems that are properly protected from external access to modules directory because of the way you are pulling your js files.

You may want to try getting the js files through the "handler" facility:

config.php?handler=file&module=tftpmanager&file=js/ajaxfileupload.js

as an example. That will pull in the file without having to have the modules directory open through httpd which opens up security vulnerabilities.

06/22/10 10:29:14 changed by mlgreene

I just installed this module and I can now no longer log into FreePBX Administration. I just get a FATAL ERROR: XML error: Mismatched tag at line 5...

06/22/10 12:29:08 changed by tylerwinfield

there was a piece of HTML that found its way into the module.xml description when i copied it. I have since updated that file. (noticed that right away myself)

06/22/10 12:29:46 changed by tylerwinfield

NOTE: i believe it was a <BR>

06/23/10 09:52:28 changed by mlgreene

I am new at this and need help! How would I go about fixing this? I can't get into the FreePBX admin panel? Where is this file? Do I just nano "file name" it? Thanks!! :)

06/23/10 10:40:43 changed by p_lindheimer

m1greene,

please move your help requests to the forum, you will get a lot more help on how to get into your system to fix things. The ticket is not the place to hold the discussions and won't be seen by many eyes. Thanks.

06/23/10 13:00:06 changed by tylerwinfield

  • attachment tftpmanager-1.1.0.0.tgz added.

fixes to security problems noted in comments, removed unnecessary scripting

06/23/10 13:02:43 changed by p_lindheimer

tylerwinfield,

if you would like to move the source into the contributed_modules directory of svn to maintain there, we would be happy to give you svn access to it. Let us know and we can make the proper arrangements so you can check it in.

06/23/10 15:30:38 changed by tylerwinfield

yes please, I would like to contribute the module to make updating things easier. Please email me any information that I need for SVN access.

Thanks kindly

07/13/10 01:05:41 changed by mbrevda

07/13/10 09:31:14 changed by p_lindheimer

tylerwinfield,

I may have forgotten to let you know but you have had access to add this to the contributed_modules directory for some time. You just need to check it into that directory. You can contact us on the #freepbx-dev IRC with any questions in getting started if need be.