Branch: Tag:

2011-01-20

2011-01-20 23:49:17 by Jonas Wallden <jonasw@roxen.com>

Reject empty paths in various graphics tag attributes if compat_level is
5.2 or higher. Fixes [bug 5791 (#5791)].

Rev: server/etc/modules/LazyImage.pmod/module.pmod:1.25
Rev: server/modules/graphics/gbutton.pike:1.125
Rev: server/modules/graphics/graphic_text.pike:1.314

1:   // This is a roxen module. Copyright © 1996 - 2009, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.313 2010/04/27 13:36:56 grubba Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.314 2011/01/20 23:49:17 jonasw Exp $";      #include <module.h>   inherit "module";
984:    foreach(filearg, string tmp)    if(string path = arg[tmp])    { +  // Reject empty file paths for sufficiently high compat_level +  if (path == "" && compat_level >= "5.2") +  RXML.parse_error("Empty " + tmp + " attribute not allowed."); +     if (!has_prefix(tmp, "magic-")) {    p[tmp] = Roxen.fix_relative(path, id);    p[tmp + "_stat"] = get_file_stat(path, id);