[prev in list] [next in list] [prev in thread] [next in thread] 

List:       privoxy-developers
Subject:    Re: [privoxy-devel] Action syntax/semantics
From:       Fabian Keil <fk () fabiankeil ! de>
Date:       2015-04-13 12:27:33
Message-ID: 5bbb0944.545dc00e () fabiankeil ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Gregory Seidman <gsslist+privoxy@anthropohedron.net> wrote:

> On Sun, Apr 12, 2015 at 12:45:30PM +0200, Fabian Keil wrote:
> > Gregory Seidman <gsslist+privoxy@anthropohedron.net> wrote:
> > 
> > > I'm working on a Firefox addon to reimplement Privoxy functionality.
> > > Yes, I know there are various addons that do various things Privoxy
> > > does, but my goal is to be able to import/export valid Privoxy .action
> > > and .filter files (though, of course, external filters and a few actions
> > > can't be supported). To do so, I need to be sure I understand the syntax
> > > and semantics. So, some questions:
> > > 
> > > - Does any action OPTIONALLY take a parameter? In particular, is the
> > >   parameter to the block action required?
> > 
> > In general, parameters are documented to be required but for some
> > actions missing parameters will merely result in an error message
> > but are otherwise accepted for backwards compatibility.
> > 
> > The block action is (currently) one of them, but this may change
> > in the future (as the block reason was introduced years ago).
> 
> Are there any others?

The block action is the only formally parameterized action that
is currently accepted without parameter, however Privoxy currently
doesn't properly sanity-check parameter content in general and thus
does not reject other kinds of invalid parameters right away.

For details see parsers.c and actions.c.

>                       I'm trying to follow Postel's Law and be liberal in
> what I accept, so I don't want to reject files the real Privoxy accepts.

In my opinion Privoxy is actually too liberal and should reject
more input than it currently does. Properly rejecting invalid input
makes it less likely that Privoxy operates differently than the user
intended.

Changing this is on the TODO list and work in progress:
http://ijbswa.cvs.sourceforge.net/viewvc/ijbswa/current/TODO?view=markup#l70

> > >   actions all claim to be "Parameterized" in the documentation
> > >   <http://www.privoxy.org/user-manual/actions-file.html>, but aren't they
> > >   actually "Multi-value" in that more than one filter or tagger of the
> > >   same type (but with different parameters) can be applied to a matched
> > >   connection?
> > 
> > Indeed. Thanks for pointing this out, I'll look into fixing this.
> 
> Excellent, thank you for the clarifications.

You're welcome.

Fabian

[Attachment #5 (application/pgp-signature)]

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF

_______________________________________________
Ijbswa-developers mailing list
Ijbswa-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ijbswa-developers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic