diff options
Diffstat (limited to 'rt/lib/RT/Interface/Web.pm')
| -rw-r--r-- | rt/lib/RT/Interface/Web.pm | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm index a8cffb8b2..ee10f01b8 100644 --- a/rt/lib/RT/Interface/Web.pm +++ b/rt/lib/RT/Interface/Web.pm @@ -2,7 +2,7 @@  #  # COPYRIGHT:  # -# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC  #                                          <sales@bestpractical.com>  #  # (Except where explicitly superseded by other copyright notices) @@ -497,6 +497,7 @@ sub MaybeRejectPrivateComponentRequest {              / # leading slash              ( Elements    |                _elements   | # mobile UI +              Callbacks   |                Widgets     |                autohandler | # requesting this directly is suspicious                l (_unsafe)? ) # loc component @@ -835,15 +836,15 @@ sub StaticFileHeaders {  Takes C<PATH> and returns a boolean indicating that the user-specified partial  component path is safe. -Currently "safe" means that the path does not start with a dot (C<.>) and does -not contain a slash-dot C</.>. +Currently "safe" means that the path does not start with a dot (C<.>), does +not contain a slash-dot C</.>, and does not contain any nulls.  =cut  sub ComponentPathIsSafe {      my $self = shift;      my $path = shift; -    return $path !~ m{(?:^|/)\.}; +    return $path !~ m{(?:^|/)\.} and $path !~ m{\0};  }  =head2 PathIsSafe | 
