Bug 65403 - abs_only only if not absolute (breaks symlinks, switches Bugzilla)

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@841 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2010-07-02 12:58:20 +00:00
parent 4d04204e22
commit 211503c460
1 changed files with 2 additions and 1 deletions

View File

@ -520,7 +520,8 @@ sub bz_locations {
#
# On mod_cgi this will be a relative path. On mod_perl it will be an
# absolute path.
my $libpath = abs_path(dirname(dirname($INC{'Bugzilla/Constants.pm'})));
my $libpath = dirname(dirname($INC{'Bugzilla/Constants.pm'}));
$libpath = abs_path($libpath) if $libpath !~ m!^/!;
# We have to detaint $libpath, but we can't use Bugzilla::Util here.
$libpath =~ /(.*)/;
$libpath = $1;