Branch: Tag:

2001-04-24

2001-04-24 12:23:24 by Per Hedbor <ph@opera.com>

Added referer (sp) header support to allow/deny security patterns

Rev: server/base_server/roxen.pike:1.661

4:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.660 2001/04/18 13:05:13 per Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.661 2001/04/24 12:23:24 per Exp $";      // Used when running threaded to find out which thread is the backend thread.   Thread.Thread backend_thread;
3937:    " if( ((th >= %[0]d) && (tm >= %[1]d)) &&\n"    " ((th <= %[2]d) && (tm <= %[3]d)) )",    }), +  "referer=%s", 1, ({ +  (< " string referer = sizeof(request_id->referer||({}))?" +  "request_id->referer[0]:\"\"; " >), +  " if( sizeof(filter(%[0]O/\",\",lambda(string q){\n" +  " return glob(q,referer);\n" +  " })) )" +  }),    "day=%s",1,({    lambda( string q ) {    multiset res = (<>);
3978:   //!   //! CMD dns=pattern [return]   //! + //! CMD day=pattern [return] + //!   //! CMD time=<start>-<stop> [return]   //! times in HH:mm format   //! -  + //! CMD referer=pattern [return] + //! Check the referer header. + //!   //! pattern is a glob pattern.   //!   //! return means that reaching this command results in immediate