[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-tasks] [task #5904] shell:// type url for rss feeds

From: jave
Subject: [Mldonkey-tasks] [task #5904] shell:// type url for rss feeds
Date: Thu, 14 Sep 2006 21:43:08 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060808 Fedora/ Firefox/ pango-text


                 Summary: shell:// type url for rss feeds
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: jave
            Submitted on: Thursday 09/14/2006 at 21:43
                Category: None
                Priority: 1 - Later
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Should Start On: Thursday 09/14/2006 at 00:00
   Should be Finished on: Thursday 09/14/2006 at 00:00



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

There are of course pros and cons to this.
- 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

- 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                                                
    mldonkey_wget_url url f 

a testcase:
urladd rss

where rsscommand looks like:

curl $1|xmllint - 


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]