patchmldonkey, a multi-networks file-sharing client - Patches: patch #5424, shell:// type url for rss feeds

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5424: shell:// type url for rss feeds

Submitter:  Joakim Verona <jave>
Submitted:  Mon 25 Sep 2006 08:40:54 PM UTC
   
 
Category:  Improved interfaces Priority:  5 - Normal
Status:  Done Assigned to:  None
Open/Closed:  Closed

Tue 14 Nov 2006 08:04:49 PM UTC, comment #3: 

Committed 2006/11/14

spiralvoice <spiralvoice>
Group administrator
Sun 12 Nov 2006 12:55:23 PM UTC, comment #2: 

safer_process_spawning.patch from Pango
ftp://ftp.berlios.de/pub/mldonkey/pango/safer_process_spawning.patch

should be merged with this patch for security reasons.

spiralvoice <spiralvoice>
Group administrator
Mon 25 Sep 2006 08:40:54 PM UTC, comment #1: 

This item has been reassigned from the project mldonkey, a multi-networks file-sharing client task tracker to your tracker.

The original report is still available at task #5904

Following are the information included in the original report:

[field #0]                  Item ID: 5904
[field #1]                 Group ID: 1409
[field #2]              Open/Closed: Open
[field #3]                 Severity: 3 - Normal
[field #4]                  Privacy: Public
[field #6]                 Category: None
[field #7]             Submitted by: jave
[field #8]              Assigned to: None
[field #9]             Submitted on: Donnerstag 14.09.2006 um 23:43
[field #10]                  Summary: shell:// type url for rss feeds
[field #11]      Original Submission: Ive made a small patch for rss feeds, so shell:// style urls can be used.

I wanted this so I could get broken rss feeds, and fix them up with xmllint first.

There are of course pros and cons to this.
Pro:
- mldonkey dont need to deal with each and every brokeness out there. feed them first through xmllint or whatever
- rss feeds can be synthesized from web pages( i have a couple of these already)

Con:
- maybe opens new security holes

The cons could be handled the same way as for the "!" command(my patch currently doesnt). Pango has a pach for a security enhanced "!" command, which could be refactored to be used with this shell:// extension. The idea is that this extension wont cause more trouble than the existing "!" command, if done properly.

here is what the patch looks like:

in commonweb:

rename mldonkey_wget to mldonkey_wget_url

let mldonkey_wget_shell url f =                                                                                                                                                                                                                                                    
  let command_urlencoded = Str.string_after url 8 in                                                                                                                                                                                                                               
  let command = Url.decode command_urlencoded in                                                                                                                                                                                                                                   
  let filename = "/tmp/crapname.out" in                                                                                                                                                                                                                                            
    Sys.command (Printf.sprintf "%s > %s" command filename);                                                                                                                                                                                                                       
    (f filename : unit)                                                                                                                                                                                                                                                            
      ( wget does something like this at the end: (f filename : unit); )                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                   
let mldonkey_wget url f =                                                                                                                                                                                                                                                          
  if Str.string_match (Str.regexp "shell://") url 0 then                                                                                                                                                                                                                           
    mldonkey_wget_shell url f                                                                                                                                                                                                                                                      
  else                                                                                                                                                                                                                                                                             
    mldonkey_wget_url url f


a testcase:
urladd rss shell:///tmp/rsscommand%2520http%253A//thepiratebay.org/rss.php%253Fcat%253D601

where rsscommand looks like:

curl $1|xmllint -

[field #13]               Item Group: None
[field #14]                   Status: None
[field #15]        Component Version: None
[field #16]         Operating System: None
[field #17]          Reproducibility: None
[field #18]               Size (loc): None
[field #19]            Fixed Release: None
[field #20]          Planned Release: None
[field #21]                   Effort: 0.00
[field #25]                 Priority: 1 - Later
[field #26]          Should Start On: Donnerstag 14.09.2006 um 02:00
[field #27]    Should be Finished on: Donnerstag 14.09.2006 um 02:00
[field #28]         Percent Complete: 0%
[field #30]                  Release: None
[field #55]     Custom Select Box #1: None
[field #56]     Custom Select Box #2: None
[field #57]     Custom Select Box #3: None
[field #58]     Custom Select Box #4: None
[field #59]     Custom Select Box #5: None
[field #60]     Custom Select Box #6: None
[field #61]     Custom Select Box #7: None
[field #62]     Custom Select Box #8: None
[field #63]     Custom Select Box #9: None
[field #64]    Custom Select Box #10: None

spiralvoice <spiralvoice>
Group administrator
Mon 25 Sep 2006 08:40:54 PM UTC, original submission:  

Ive made a small patch for rss feeds, so shell:// style urls can be used.

I wanted this so I could get broken rss feeds, and fix them up with xmllint first.

There are of course pros and cons to this.
Pro:
- mldonkey dont need to deal with each and every brokeness out there. feed them first through xmllint or whatever
- rss feeds can be synthesized from web pages( i have a couple of these already)

Con:
- maybe opens new security holes

The cons could be handled the same way as for the "!" command(my patch currently doesnt). Pango has a pach for a security enhanced "!" command, which could be refactored to be used with this shell:// extension. The idea is that this extension wont cause more trouble than the existing "!" command, if done properly.

here is what the patch looks like:

in commonweb:

rename mldonkey_wget to mldonkey_wget_url

let mldonkey_wget_shell url f =                                                                                                                                                                                                                                                    
  let command_urlencoded = Str.string_after url 8 in                                                                                                                                                                                                                               
  let command = Url.decode command_urlencoded in                                                                                                                                                                                                                                   
  let filename = "/tmp/crapname.out" in                                                                                                                                                                                                                                            
    Sys.command (Printf.sprintf "%s > %s" command filename);                                                                                                                                                                                                                       
    (f filename : unit)                                                                                                                                                                                                                                                            
      ( wget does something like this at the end: (f filename : unit); )                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                   
let mldonkey_wget url f =                                                                                                                                                                                                                                                          
  if Str.string_match (Str.regexp "shell://") url 0 then                                                                                                                                                                                                                           
    mldonkey_wget_shell url f                                                                                                                                                                                                                                                      
  else                                                                                                                                                                                                                                                                             
    mldonkey_wget_url url f


a testcase:
urladd rss shell:///tmp/rsscommand%2520http%253A//thepiratebay.org/rss.php%253Fcat%253D601

where rsscommand looks like:

curl $1|xmllint -

Joakim Verona <jave>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #11268:  5424.patch added by spiralvoice (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 12 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-11-14 spiralvoice StatusReady For Test Done
    Open/ClosedOpen Closed
2006-11-14 spiralvoice CategoryNone Improved interfaces
    Priority1 - Later 5 - Normal
    StatusNone Ready For Test
    SummaryReassigned item: shell:// type url for rss feeds shell:// type url for rss feeds
2006-11-14 spiralvoice Attached File- Added 5424.patch, #11268
2006-11-14 spiralvoice Attached File#11260 Removed
2006-11-14 spiralvoice Attached File#11240 Removed
2006-11-14 jave Attached File- Added rss_shell.patch, #11260
2006-11-12 spiralvoice Attached File- Added safer_process_spawning.patch, #11240
2006-09-25 spiralvoice Reassign itemFrom group mldonkey, a multi-networks file-sharing client, task tracker To group mldonkey, a multi-networks file-sharing client, patch tracker

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code