httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/glue/perl/xsbuilder apreq_xs_tables.h
Date Wed, 04 Aug 2004 19:33:43 GMT
joes        2004/08/04 12:33:43

  Modified:    glue/perl/xsbuilder apreq_xs_tables.h
  Log:
  Taint table objects if add() or set() includes a tainted key or value.
  
  Revision  Changes    Path
  1.33      +4 -0      httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_tables.h
  
  Index: apreq_xs_tables.h
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_tables.h,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- apreq_xs_tables.h	3 Aug 2004 20:40:45 -0000	1.32
  +++ apreq_xs_tables.h	4 Aug 2004 19:33:43 -0000	1.33
  @@ -141,12 +141,16 @@
                                                                           \
           if (SvROK(ST(items-1))) {                                       \
               RETVAL = (apreq_##attr##_t *)SvIVX(SvRV(ST(items-1)));      \
  +            if (SvTAINTED(SvRV(ST(items-1))))                           \
  +                SvTAINTED_on(obj);                                      \
           }                                                               \
           else if (items == 3) {                                          \
               key = SvPV(ST(1),klen);                                     \
               val = SvPV(ST(2),vlen);                                     \
               RETVAL = apreq_make_##attr(apreq_env_pool(env), key, klen,  \
                                          val, vlen);                      \
  +            if (SvTAINTED(ST(1)) || SvTAINTED(ST(2)))                   \
  +                SvTAINTED_on(obj);                                      \
           }                                                               \
           apr_table_##method##n(t, RETVAL->v.name, RETVAL->v.data);       \
           XSRETURN_EMPTY;                                                 \
  
  
  

Mime
View raw message