Re: cvs: smarty / NEWS /libs/internals core.display_debug_console.php

"messju mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <20050804210016.GA32682@dune>
On Thu, Aug 04, 2005 at 08:21:42PM -0000, Monte Ohrt wrote:
> mohrt		Thu Aug  4 16:21:42 2005 EDT
> 
>   Modified files:              
>     /smarty	NEWS 
>     /smarty/libs/internals	core.display_debug_console.php 
>   Log:
>   allow debug.tpl to work from arbitrary dir

FYI: this is not quite correct in this correct in this context.

the first patch (the one you added by accident), allows
$smarty->secure_dir[] to contains files and not only directories. 
(this still should get a NEWS-entry, BTW)

but this patch (the one below) makes use of this additional feature
for the internal debug_console just when no $smarty->debug_console was
defined. it tightens security a little by not adding SMARTY_DIR to
secure_dir[] but adding just the full path to debug.tpl.


> http://cvs.php.net/diff.php/smarty/NEWS?r1=1.507&r2=1.508&ty=u
> Index: smarty/NEWS
> diff -u smarty/NEWS:1.507 smarty/NEWS:1.508
> --- smarty/NEWS:1.507	Thu Aug  4 15:43:19 2005
> +++ smarty/NEWS	Thu Aug  4 16:21:33 2005
> @@ -1,3 +1,4 @@
> +  - allow debug.tpl to work from arbitrary dir (monte)
>    - fix proper escaping for literal strings in
>      Smarty_Compiler::_parse_var_props() (boots, messju)
>    - remove ambiguity for numeric values passed to smarty_make_timestamp()
> http://cvs.php.net/diff.php/smarty/libs/internals/core.display_debug_console.php?r1=1.1&r2=1.2&ty=u
> Index: smarty/libs/internals/core.display_debug_console.php
> diff -u smarty/libs/internals/core.display_debug_console.php:1.1 smarty/libs/internals/core.display_debug_console.php:1.2
> --- smarty/libs/internals/core.display_debug_console.php:1.1	Thu Sep 16 19:07:32 2004
> +++ smarty/libs/internals/core.display_debug_console.php	Thu Aug  4 16:21:39 2005
> @@ -23,7 +23,7 @@
>          // set path to debug template from SMARTY_DIR
>          $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
>          if($smarty->security && is_file($smarty->debug_tpl)) {
> -            $smarty->secure_dir[] = dirname(realpath($smarty->debug_tpl));
> +            $smarty->secure_dir[] = realpath($smarty->debug_tpl);
>          }
>          $smarty->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl';
>      }
> 
> -- 
> Smarty CVS Mailing List (http://cvs.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.