Branch: Tag:

2000-08-29

2000-08-29 23:45:06 by Martin Stjernholm <mast@lysator.liu.se>

Added sanity checks for bad tag names.

Rev: server/etc/modules/RXML.pmod/module.pmod:1.105

2:   //!   //! Created 1999-07-30 by Martin Stjernholm.   //! - //! $Id: module.pmod,v 1.104 2000/08/21 01:02:01 nilsson Exp $ + //! $Id: module.pmod,v 1.105 2000/08/29 23:45:06 mast Exp $      //! Kludge: Must use "RXML.refs" somewhere for the whole module to be   //! loaded correctly.
371: Inside #if defined(MODULE_DEBUG)
   error ("Trying to register a tag %O without a name.\n", tag);    if (!functionp (tag->Frame) && !tag->plugin_name)    error ("Trying to register a tag %O without a Frame class or function.\n", tag); +  if (tag->name[..3] != "!--#" && // Ugly special case for SSI tags. +  replace (tag->name, "#<>& \t\n\r" / "", ({""}) * 8) != tag->name) +  error ("Invalid character(s) in name for tag %O.\n", tag);   #endif    if (tag->flags & FLAG_PROC_INSTR) {    if (!proc_instrs) proc_instrs = ([]);
392: Inside #if defined(MODULE_DEBUG)
   error ("Trying to register a tag %O without a name.\n", tag);    if (!functionp (tag->Frame) && !tag->plugin_name)    error ("Trying to register a tag %O without a Frame class or function.\n", tag); +  if (tag->name[..3] != "!--#" && // Ugly special case for SSI tags. +  replace (tag->name, "#<>& \t\n\r" / "", ({""}) * 8) != tag->name) +  error ("Invalid character(s) in name for tag %O.\n", tag);   #endif    if (tag->flags & FLAG_PROC_INSTR) {    if (!proc_instrs) proc_instrs = ([]);