summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorivan <ivan>2011-04-18 23:49:54 +0000
committerivan <ivan>2011-04-18 23:49:54 +0000
commit01f60974743197ac14e569c16c68a0c2ff3a5bd4 (patch)
tree140ae6bfc2a89a2b635c81859a74eff5587ef71a /rt
parentb5c4237a34aef94976bc343c8d9e138664fc3984 (diff)
commiting rt 3.8.10 to HEAD
Diffstat (limited to 'rt')
-rw-r--r--rt/Makefile4
-rw-r--r--rt/Makefile.in2
-rwxr-xr-xrt/bin/fastcgi_server12
-rwxr-xr-xrt/bin/mason_handler.fcgi11
-rwxr-xr-xrt/bin/mason_handler.scgi12
-rw-r--r--rt/bin/mason_handler.svc11
-rwxr-xr-xrt/bin/rt-mailgate4
-rw-r--r--rt/bin/rt-mailgate.in2
-rwxr-xr-xrt/bin/standalone_httpd2
-rw-r--r--rt/config.log273
-rwxr-xr-xrt/config.status132
-rw-r--r--rt/configure.ac4
-rw-r--r--rt/lib/RT.pm8
-rw-r--r--rt/lib/RT.pm.in6
-rwxr-xr-xrt/lib/RT/Action.pm5
-rw-r--r--rt/lib/RT/Action/CreateTickets.pm5
-rw-r--r--rt/lib/RT/Action/EscalatePriority.pm5
-rwxr-xr-xrt/lib/RT/Condition.pm5
-rw-r--r--rt/lib/RT/Config.pm13
-rw-r--r--rt/lib/RT/CustomField.pm19
-rw-r--r--rt/lib/RT/Date.pm5
-rw-r--r--rt/lib/RT/Interface/Web.pm56
-rw-r--r--rt/lib/RT/Principal_Overlay.pm12
-rwxr-xr-xrt/lib/RT/Record.pm5
-rw-r--r--rt/lib/RT/Search/Googleish.pm5
-rw-r--r--rt/lib/RT/SearchBuilder.pm55
-rw-r--r--rt/lib/RT/System.pm5
-rw-r--r--rt/lib/RT/Test.pm28
-rw-r--r--rt/lib/RT/Ticket_Overlay.pm7
-rw-r--r--rt/lib/RT/Tickets_Overlay.pm38
-rw-r--r--rt/lib/RT/User_Overlay.pm9
-rw-r--r--rt/lib/RT/Users_Overlay.pm6
-rw-r--r--rt/sbin/rt-setup-database.in2
-rwxr-xr-xrt/share/html/Admin/Elements/EditCustomFields12
34 files changed, 466 insertions, 314 deletions
diff --git a/rt/Makefile b/rt/Makefile
index 2365d927c..6ba9063e1 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -63,7 +63,7 @@ SITE_CONFIG_FILE = $(CONFIG_FILE_PATH)/RT_SiteConfig.pm
RT_VERSION_MAJOR = 3
RT_VERSION_MINOR = 8
-RT_VERSION_PATCH = 9
+RT_VERSION_PATCH = 10
RT_VERSION = $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)
TAG = rt-$(RT_VERSION_MAJOR)-$(RT_VERSION_MINOR)-$(RT_VERSION_PATCH)
@@ -527,7 +527,7 @@ apachectl:
SNAPSHOT=$(shell git describe --tags)
snapshot:
git archive --prefix "$(SNAPSHOT)/" HEAD | tar -xf -
- ( cd $(SNAPSHOT) && autoconf && ./configure )
+ ( cd $(SNAPSHOT) && autoconf && PERL=/usr/bin/perl ./configure )
tar -czf "$(SNAPSHOT).tar.gz" "$(SNAPSHOT)/"
rm -fr "$(SNAPSHOT)/"
diff --git a/rt/Makefile.in b/rt/Makefile.in
index 2288cfa59..d41633fff 100644
--- a/rt/Makefile.in
+++ b/rt/Makefile.in
@@ -527,7 +527,7 @@ apachectl:
SNAPSHOT=$(shell git describe --tags)
snapshot:
git archive --prefix "$(SNAPSHOT)/" HEAD | tar -xf -
- ( cd $(SNAPSHOT) && autoconf && ./configure )
+ ( cd $(SNAPSHOT) && autoconf && PERL=/usr/bin/perl ./configure )
tar -czf "$(SNAPSHOT).tar.gz" "$(SNAPSHOT)/"
rm -fr "$(SNAPSHOT)/"
diff --git a/rt/bin/fastcgi_server b/rt/bin/fastcgi_server
index 248267e45..4ccf014da 100755
--- a/rt/bin/fastcgi_server
+++ b/rt/bin/fastcgi_server
@@ -230,6 +230,18 @@ while ( my $cgi = CGI::Fast->new ) {
Module::Refresh->refresh if RT->Config->Get('DevelMode');
RT::ConnectToDatabase();
+ # Each environment has its own way of handling .. and so on in paths,
+ # so RT consistently forbids such paths.
+ if ( $cgi->path_info =~ m{/\.} ) {
+ $RT::Logger->crit("Invalid request for ".$cgi->path_info." aborting");
+ print STDOUT "HTTP/1.0 400\r\n\r\n";
+
+ RT::Interface::Web::Handler->CleanupRequest();
+ $proc_manager->pm_post_dispatch;
+
+ next;
+ }
+
my $interp = $RT::Mason::Handler->interp;
if (
!$interp->comp_exists( $cgi->path_info )
diff --git a/rt/bin/mason_handler.fcgi b/rt/bin/mason_handler.fcgi
index 432296be7..996e96076 100755
--- a/rt/bin/mason_handler.fcgi
+++ b/rt/bin/mason_handler.fcgi
@@ -68,6 +68,17 @@ while ( my $cgi = CGI::Fast->new ) {
Module::Refresh->refresh if RT->Config->Get('DevelMode');
RT::ConnectToDatabase();
+ # Each environment has its own way of handling .. and so on in paths,
+ # so RT consistently forbids such paths.
+ if ( $cgi->path_info =~ m{/\.} ) {
+ $RT::Logger->crit("Invalid request for ".$cgi->path_info." aborting");
+ print STDOUT "HTTP/1.0 400\r\n\r\n";
+
+ RT::Interface::Web::Handler->CleanupRequest();
+
+ next;
+ }
+
my $interp = $RT::Mason::Handler->interp;
if (
!$interp->comp_exists( $cgi->path_info )
diff --git a/rt/bin/mason_handler.scgi b/rt/bin/mason_handler.scgi
index 5cbb9a30f..83649edaf 100755
--- a/rt/bin/mason_handler.scgi
+++ b/rt/bin/mason_handler.scgi
@@ -57,6 +57,18 @@ require (dirname(__FILE__) . '/webmux.pl');
require CGI;
my $cgi = CGI->new;
+
+# Each environment has its own way of handling .. and so on in paths,
+# so RT consistently forbids such paths.
+if ( $cgi->path_info =~ m{/\.} ) {
+ $RT::Logger->crit("Invalid request for ".$cgi->path_info." aborting");
+ print STDOUT "HTTP/1.0 400\r\n\r\n";
+
+ RT::Interface::Web::Handler->CleanupRequest();
+
+ return 0;
+}
+
if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
&& ( $Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) ) ) {
$cgi->path_info( $cgi->path_info . "/index.html" );
diff --git a/rt/bin/mason_handler.svc b/rt/bin/mason_handler.svc
index ceb6cbcd9..6275a9e59 100644
--- a/rt/bin/mason_handler.svc
+++ b/rt/bin/mason_handler.svc
@@ -234,6 +234,17 @@ $Handler ||= RT::Interface::Web::Handler->new(
while( my $cgi = CGI::Fast->new ) {
my $comp = $ENV{'PATH_INFO'};
+ # Each environment has its own way of handling .. and so on in paths,
+ # so RT consistently forbids such paths.
+ if ( $cgi->path_info =~ m{/\.} ) {
+ $RT::Logger->crit("Invalid request for ".$cgi->path_info." aborting");
+ print STDOUT "HTTP/1.0 400\r\n\r\n";
+
+ RT::Interface::Web::Handler->CleanupRequest();
+
+ next;
+ }
+
$comp = $1 if ($comp =~ /^(.*)$/);
my $web_path = RT->Config->Get('WebPath');
$comp =~ s|^\Q$web_path\E\b||i;
diff --git a/rt/bin/rt-mailgate b/rt/bin/rt-mailgate
index 9227a6ee6..de0529d84 100755
--- a/rt/bin/rt-mailgate
+++ b/rt/bin/rt-mailgate
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
@@ -186,7 +186,7 @@ sub write_down_message {
print STDERR "$0: Couldn't create temp file, using memory\n";
print STDERR "error: $@\n" if $@;
- my $message = \do { local (@ARGV, $/); <> };
+ my $message = \do { local (@ARGV, $/); <STDIN> };
unless ( $$message =~ /\S/ ) {
print STDERR "$0: no message passed on STDIN\n";
exit 0;
diff --git a/rt/bin/rt-mailgate.in b/rt/bin/rt-mailgate.in
index 10db6ad1e..a74b2da15 100644
--- a/rt/bin/rt-mailgate.in
+++ b/rt/bin/rt-mailgate.in
@@ -186,7 +186,7 @@ sub write_down_message {
print STDERR "$0: Couldn't create temp file, using memory\n";
print STDERR "error: $@\n" if $@;
- my $message = \do { local (@ARGV, $/); <> };
+ my $message = \do { local (@ARGV, $/); <STDIN> };
unless ( $$message =~ /\S/ ) {
print STDERR "$0: no message passed on STDIN\n";
exit 0;
diff --git a/rt/bin/standalone_httpd b/rt/bin/standalone_httpd
index 9488d0a8b..a307910c1 100755
--- a/rt/bin/standalone_httpd
+++ b/rt/bin/standalone_httpd
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
# BEGIN BPS TAGGED BLOCK {{{
#
# COPYRIGHT:
diff --git a/rt/config.log b/rt/config.log
index 636e689d8..e619abd86 100644
--- a/rt/config.log
+++ b/rt/config.log
@@ -1,8 +1,8 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by RT configure 3.8.9, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+It was created by RT configure 3.8.10, which was
+generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --enable-layout=Freeside --with-db-type=Pg --with-db-dba=freeside --with-db-database=freeside --with-db-rt-user=freeside --with-db-rt-pass= --with-web-user=freeside --with-web-group=freeside --with-rt-group=freeside
@@ -12,9 +12,9 @@ generated by GNU Autoconf 2.65. Invocation command line was
hostname = transom.local
uname -m = i386
-uname -r = 10.6.0
+uname -r = 10.7.0
uname -s = Darwin
-uname -v = Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386
+uname -v = Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
@@ -23,15 +23,15 @@ uname -v = Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
- Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386
+ Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386
Kernel configured for up to 2 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1
Primary memory available: 8.00 gigabytes
-Default processor set: 158 tasks, 589 threads, 2 processors
-Load average: 0.94, Mach factor: 1.30
+Default processor set: 141 tasks, 509 threads, 2 processors
+Load average: 1.63, Mach factor: 0.74
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
@@ -56,101 +56,110 @@ PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/X11/bin
+PATH: /Users/falcone/perl5/perlbrew/bin
+PATH: /Users/falcone/perl5/perlbrew/perls/current/bin
+PATH: /Users/falcone/gitprojects/v/
+PATH: /opt/local/bin
+PATH: /opt/local/sbin
+PATH: /Users/falcone/bin
+PATH: /Users/falcone/ec2/bin
+PATH: /Users/falcone/work/git/git-sync
+PATH: /Users/falcone/work/private-git/git-tools
+PATH: /Users/falcone/Documents//android-sdk-mac_86/tools
## ----------- ##
## Core tests. ##
## ----------- ##
-configure:1979: checking for a BSD-compatible install
-configure:2047: result: /usr/bin/install -c
-configure:2062: checking for gawk
-configure:2078: found /opt/local/bin/gawk
-configure:2089: result: gawk
-configure:2103: checking for perl
-configure:2121: found /Users/falcone/perl5/perlbrew/bin/perl
-configure:2134: result: /Users/falcone/perl5/perlbrew/bin/perl
-configure:2499: checking for chosen layout
-configure:2512: result: relative
-configure:2671: checking if user www exists
-configure:2674: result: found
-configure:2695: checking if group www exists
-configure:2698: result: found
-configure:2718: checking if group rt3 exists
-configure:2724: result: not found
-configure:2718: checking if group rt exists
-configure:2724: result: not found
-configure:2718: checking if group www exists
-configure:2721: result: found
-configure:2751: checking if database name is valid
-configure:2754: result: yes
-configure:2845: checking for gcc
-configure:2861: found /usr/bin/gcc
-configure:2872: result: gcc
-configure:3101: checking for C compiler version
-configure:3110: gcc --version >&5
-i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
+configure:1995: checking for a BSD-compatible install
+configure:2063: result: /usr/bin/install -c
+configure:2078: checking for gawk
+configure:2094: found /opt/local/bin/gawk
+configure:2105: result: gawk
+configure:2119: checking for perl
+configure:2150: result: /usr/bin/perl
+configure:2515: checking for chosen layout
+configure:2528: result: relative
+configure:2687: checking if user www exists
+configure:2690: result: found
+configure:2711: checking if group www exists
+configure:2714: result: found
+configure:2734: checking if group rt3 exists
+configure:2740: result: not found
+configure:2734: checking if group rt exists
+configure:2740: result: not found
+configure:2734: checking if group www exists
+configure:2737: result: found
+configure:2767: checking if database name is valid
+configure:2770: result: yes
+configure:2861: checking for gcc
+configure:2877: found /usr/bin/gcc
+configure:2888: result: gcc
+configure:3117: checking for C compiler version
+configure:3126: gcc --version >&5
+i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-configure:3121: $? = 0
-configure:3110: gcc -v >&5
+configure:3137: $? = 0
+configure:3126: gcc -v >&5
Using built-in specs.
Target: i686-apple-darwin10
-Configured with: /var/tmp/gcc/gcc-5664~89/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
+Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
-gcc version 4.2.1 (Apple Inc. build 5664)
-configure:3121: $? = 0
-configure:3110: gcc -V >&5
+gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
+configure:3137: $? = 0
+configure:3126: gcc -V >&5
gcc-4.2: argument to `-V' is missing
-configure:3121: $? = 1
-configure:3110: gcc -qversion >&5
+configure:3137: $? = 1
+configure:3126: gcc -qversion >&5
i686-apple-darwin10-gcc-4.2.1: no input files
-configure:3121: $? = 1
-configure:3141: checking whether the C compiler works
-configure:3163: gcc conftest.c >&5
-configure:3167: $? = 0
-configure:3216: result: yes
-configure:3219: checking for C compiler default output file name
-configure:3221: result: a.out
-configure:3227: checking for suffix of executables
-configure:3234: gcc -o conftest conftest.c >&5
-configure:3238: $? = 0
-configure:3260: result:
-configure:3282: checking whether we are cross compiling
-configure:3290: gcc -o conftest conftest.c >&5
-configure:3294: $? = 0
-configure:3301: ./conftest
-configure:3305: $? = 0
-configure:3320: result: no
-configure:3325: checking for suffix of object files
-configure:3347: gcc -c conftest.c >&5
-configure:3351: $? = 0
-configure:3372: result: o
-configure:3376: checking whether we are using the GNU C compiler
-configure:3395: gcc -c conftest.c >&5
-configure:3395: $? = 0
-configure:3404: result: yes
-configure:3413: checking whether gcc accepts -g
-configure:3433: gcc -c -g conftest.c >&5
-configure:3433: $? = 0
-configure:3474: result: yes
-configure:3491: checking for gcc option to accept ISO C89
-configure:3555: gcc -c -g -O2 conftest.c >&5
-configure:3555: $? = 0
-configure:3568: result: none needed
-configure:3589: checking for aginitlib in -lgraph
-configure:3614: gcc -o conftest -g -O2 conftest.c -lgraph >&5
+configure:3137: $? = 1
+configure:3157: checking whether the C compiler works
+configure:3179: gcc conftest.c >&5
+configure:3183: $? = 0
+configure:3231: result: yes
+configure:3234: checking for C compiler default output file name
+configure:3236: result: a.out
+configure:3242: checking for suffix of executables
+configure:3249: gcc -o conftest conftest.c >&5
+configure:3253: $? = 0
+configure:3275: result:
+configure:3297: checking whether we are cross compiling
+configure:3305: gcc -o conftest conftest.c >&5
+configure:3309: $? = 0
+configure:3316: ./conftest
+configure:3320: $? = 0
+configure:3335: result: no
+configure:3340: checking for suffix of object files
+configure:3362: gcc -c conftest.c >&5
+configure:3366: $? = 0
+configure:3387: result: o
+configure:3391: checking whether we are using the GNU C compiler
+configure:3410: gcc -c conftest.c >&5
+configure:3410: $? = 0
+configure:3419: result: yes
+configure:3428: checking whether gcc accepts -g
+configure:3448: gcc -c -g conftest.c >&5
+configure:3448: $? = 0
+configure:3489: result: yes
+configure:3506: checking for gcc option to accept ISO C89
+configure:3570: gcc -c -g -O2 conftest.c >&5
+configure:3570: $? = 0
+configure:3583: result: none needed
+configure:3604: checking for aginitlib in -lgraph
+configure:3629: gcc -o conftest -g -O2 conftest.c -lgraph >&5
ld: library not found for -lgraph
collect2: ld returned 1 exit status
-configure:3614: $? = 1
+configure:3629: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "RT"
| #define PACKAGE_TARNAME "rt"
-| #define PACKAGE_VERSION "3.8.9"
-| #define PACKAGE_STRING "RT 3.8.9"
+| #define PACKAGE_VERSION "3.8.10"
+| #define PACKAGE_STRING "RT 3.8.10"
| #define PACKAGE_BUGREPORT "rt-bugs@bestpractical.com"
| #define PACKAGE_URL ""
| /* end confdefs.h. */
@@ -169,21 +178,21 @@ configure: failed program was:
| ;
| return 0;
| }
-configure:3623: result: no
-configure:3649: checking for gdlib-config
-configure:3665: found /opt/local/bin/gdlib-config
-configure:3677: result: yes
-configure:3705: checking for gpg
-configure:3721: found /opt/local/bin/gpg
-configure:3733: result: yes
-configure:4032: creating ./config.status
+configure:3638: result: no
+configure:3664: checking for gdlib-config
+configure:3680: found /opt/local/bin/gdlib-config
+configure:3692: result: yes
+configure:3720: checking for gpg
+configure:3736: found /opt/local/bin/gpg
+configure:3748: result: yes
+configure:4059: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
-This file was extended by RT config.status 3.8.9, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+This file was extended by RT config.status 3.8.10, which was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
@@ -193,36 +202,36 @@ generated by GNU Autoconf 2.65. Invocation command line was
on transom.local
-config.status:860: creating etc/upgrade/3.8-branded-queues-extension
-config.status:860: creating etc/upgrade/3.8-ical-extension
-config.status:860: creating etc/upgrade/split-out-cf-categories
-config.status:860: creating etc/upgrade/generate-rtaddressregexp
-config.status:860: creating etc/upgrade/vulnerable-passwords
-config.status:860: creating sbin/rt-attributes-viewer
-config.status:860: creating sbin/rt-dump-database
-config.status:860: creating sbin/rt-setup-database
-config.status:860: creating sbin/rt-test-dependencies
-config.status:860: creating sbin/rt-email-digest
-config.status:860: creating sbin/rt-email-dashboards
-config.status:860: creating sbin/rt-clean-sessions
-config.status:860: creating sbin/rt-shredder
-config.status:860: creating sbin/rt-validator
-config.status:860: creating sbin/rt-email-group-admin
-config.status:860: creating sbin/rt-server
-config.status:860: creating bin/fastcgi_server
-config.status:860: creating bin/mason_handler.fcgi
-config.status:860: creating bin/mason_handler.scgi
-config.status:860: creating bin/standalone_httpd
-config.status:860: creating bin/rt-crontool
-config.status:860: creating bin/rt-mailgate
-config.status:860: creating bin/rt
-config.status:860: creating Makefile
-config.status:860: creating etc/RT_Config.pm
-config.status:860: creating lib/RT.pm
-config.status:860: creating bin/mason_handler.svc
-config.status:860: creating bin/webmux.pl
-config.status:860: creating t/data/configs/apache2.2+mod_perl.conf
-config.status:860: creating t/data/configs/apache2.2+fastcgi.conf
+config.status:869: creating etc/upgrade/3.8-branded-queues-extension
+config.status:869: creating etc/upgrade/3.8-ical-extension
+config.status:869: creating etc/upgrade/split-out-cf-categories
+config.status:869: creating etc/upgrade/generate-rtaddressregexp
+config.status:869: creating etc/upgrade/vulnerable-passwords
+config.status:869: creating sbin/rt-attributes-viewer
+config.status:869: creating sbin/rt-dump-database
+config.status:869: creating sbin/rt-setup-database
+config.status:869: creating sbin/rt-test-dependencies
+config.status:869: creating sbin/rt-email-digest
+config.status:869: creating sbin/rt-email-dashboards
+config.status:869: creating sbin/rt-clean-sessions
+config.status:869: creating sbin/rt-shredder
+config.status:869: creating sbin/rt-validator
+config.status:869: creating sbin/rt-email-group-admin
+config.status:869: creating sbin/rt-server
+config.status:869: creating bin/fastcgi_server
+config.status:869: creating bin/mason_handler.fcgi
+config.status:869: creating bin/mason_handler.scgi
+config.status:869: creating bin/standalone_httpd
+config.status:869: creating bin/rt-crontool
+config.status:869: creating bin/rt-mailgate
+config.status:869: creating bin/rt
+config.status:869: creating Makefile
+config.status:869: creating etc/RT_Config.pm
+config.status:869: creating lib/RT.pm
+config.status:869: creating bin/mason_handler.svc
+config.status:869: creating bin/webmux.pl
+config.status:869: creating t/data/configs/apache2.2+mod_perl.conf
+config.status:869: creating t/data/configs/apache2.2+fastcgi.conf
## ---------------- ##
## Cache variables. ##
@@ -239,8 +248,8 @@ ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
-ac_cv_env_PERL_set=
-ac_cv_env_PERL_value=
+ac_cv_env_PERL_set=set
+ac_cv_env_PERL_value=/usr/bin/perl
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
@@ -249,7 +258,7 @@ ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_lib_graph_aginitlib=no
ac_cv_objext=o
-ac_cv_path_PERL=/Users/falcone/perl5/perlbrew/bin/perl
+ac_cv_path_PERL=/usr/bin/perl
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
@@ -270,7 +279,7 @@ DB_RT_HOST='localhost'
DB_RT_PASS='rt_pass'
DB_RT_USER='rt_user'
DB_TYPE='mysql'
-DEFS='-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.8.9\" -DPACKAGE_STRING=\"RT\ 3.8.9\" -DPACKAGE_BUGREPORT=\"rt-bugs@bestpractical.com\" -DPACKAGE_URL=\"\"'
+DEFS='-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.8.10\" -DPACKAGE_STRING=\"RT\ 3.8.10\" -DPACKAGE_BUGREPORT=\"rt-bugs@bestpractical.com\" -DPACKAGE_URL=\"\"'
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
@@ -291,12 +300,12 @@ MASON_LOCAL_HTML_PATH='/opt/rt3/local/html'
MASON_SESSION_PATH='/opt/rt3/var/session_data'
PACKAGE_BUGREPORT='rt-bugs@bestpractical.com'
PACKAGE_NAME='RT'
-PACKAGE_STRING='RT 3.8.9'
+PACKAGE_STRING='RT 3.8.10'
PACKAGE_TARNAME='rt'
PACKAGE_URL=''
-PACKAGE_VERSION='3.8.9'
+PACKAGE_VERSION='3.8.10'
PATH_SEPARATOR=':'
-PERL='/Users/falcone/perl5/perlbrew/bin/perl'
+PERL='/usr/bin/perl'
RTGROUP='www'
RT_BIN_PATH='bin'
RT_BIN_PATH_R='/opt/rt3/bin'
@@ -313,7 +322,7 @@ RT_STANDALONE='0'
RT_VAR_PATH='/opt/rt3/var'
RT_VERSION_MAJOR='3'
RT_VERSION_MINOR='8'
-RT_VERSION_PATCH='9'
+RT_VERSION_PATCH='10'
SHELL='/bin/sh'
SPEEDY_BIN='/usr/local/bin/speedy'
WEB_GROUP='freeside'
@@ -363,7 +372,7 @@ program_transform_name='s,x,x,'
rt_layout_name='Freeside'
rt_version_major='3'
rt_version_minor='8'
-rt_version_patch='9'
+rt_version_patch='10'
sbindir='sbin'
sessionstatedir='var/session_data'
sharedstatedir='${prefix}/com'
@@ -378,8 +387,8 @@ target_alias=''
#define PACKAGE_NAME "RT"
#define PACKAGE_STRING "RT 3.6.4"
#define PACKAGE_TARNAME "rt"
-#define PACKAGE_VERSION "3.8.9"
-#define PACKAGE_STRING "RT 3.8.9"
+#define PACKAGE_VERSION "3.8.10"
+#define PACKAGE_STRING "RT 3.8.10"
#define PACKAGE_BUGREPORT "rt-bugs@bestpractical.com"
#define PACKAGE_URL ""
diff --git a/rt/config.status b/rt/config.status
index 293cc6c3e..83560ece8 100755
--- a/rt/config.status
+++ b/rt/config.status
@@ -89,6 +89,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -134,19 +135,19 @@ export LANGUAGE
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -342,7 +343,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -391,8 +392,8 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by RT $as_me 3.8.9, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+This file was extended by RT $as_me 3.8.10, which was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -428,17 +429,17 @@ $config_files
Report bugs to <rt-bugs@bestpractical.com>."
-ac_cs_config=""
+ac_cs_config="'PERL=/usr/bin/perl'"
ac_cs_version="\
-RT config.status 3.8.9
-configured by ./configure, generated by GNU Autoconf 2.65,
+RT config.status 3.8.10
+configured by ./configure, generated by GNU Autoconf 2.68,
with options \"$ac_cs_config\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-ac_pwd='/Users/falcone/work/rt/3.8/rt-3.8.9'
+ac_pwd='/Users/falcone/work/rt/security/rt-3.8.10'
srcdir='.'
INSTALL='/usr/bin/install -c'
AWK='gawk'
@@ -448,11 +449,16 @@ ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -474,6 +480,7 @@ do
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -484,7 +491,7 @@ do
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -502,7 +509,7 @@ if $ac_cs_silent; then
fi
if $ac_cs_recheck; then
- set X '/bin/sh' './configure' $ac_configure_extra_args --no-create --no-recursion
+ set X '/bin/sh' './configure' 'PERL=/usr/bin/perl' $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
CONFIG_SHELL='/bin/sh'
@@ -555,7 +562,7 @@ do
"t/data/configs/apache2.2+mod_perl.conf") CONFIG_FILES="$CONFIG_FILES t/data/configs/apache2.2+mod_perl.conf" ;;
"t/data/configs/apache2.2+fastcgi.conf") CONFIG_FILES="$CONFIG_FILES t/data/configs/apache2.2+fastcgi.conf" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -576,9 +583,10 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -586,12 +594,13 @@ $debug ||
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -608,13 +617,13 @@ if test "x$ac_cr" = x; then
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-cat >>"$tmp/subs1.awk" <<\_ACAWK &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+cat >>"$ac_tmp/subs1.awk" <<\_ACAWK &&
S["LTLIBOBJS"]=""
S["LIBOBJS"]=""
S["RT_LOG_PATH_R"]="/opt/rt3/var/log"
@@ -657,7 +666,7 @@ S["RT_LIB_PATH"]="lib"
S["RT_LOCAL_PATH"]="local"
S["RT_DOC_PATH"]="share/doc"
S["RT_PATH"]="/opt/rt3"
-S["RT_VERSION_PATCH"]="9"
+S["RT_VERSION_PATCH"]="10"
S["RT_VERSION_MINOR"]="8"
S["RT_VERSION_MAJOR"]="3"
S["RT_GPG"]="1"
@@ -723,12 +732,12 @@ S["exp_exec_prefix"]="/opt/rt3"
S["exp_prefix"]="/opt/rt3"
S["SPEEDY_BIN"]="/usr/local/bin/speedy"
S["WEB_HANDLER"]="fastcgi"
-S["PERL"]="/Users/falcone/perl5/perlbrew/bin/perl"
+S["PERL"]="/usr/bin/perl"
S["AWK"]="gawk"
S["INSTALL_DATA"]="${INSTALL} -m 644"
S["INSTALL_SCRIPT"]="${INSTALL}"
S["INSTALL_PROGRAM"]="${INSTALL}"
-S["rt_version_patch"]="9"
+S["rt_version_patch"]="10"
S["rt_version_minor"]="8"
S["rt_version_major"]="3"
S["target_alias"]=""
@@ -738,8 +747,8 @@ S["LIBS"]=""
S["ECHO_T"]=""
S["ECHO_N"]=""
S["ECHO_C"]="\\c"
-S["DEFS"]="-DPACKAGE_NAME=\\\"RT\\\" -DPACKAGE_TARNAME=\\\"rt\\\" -DPACKAGE_VERSION=\\\"3.8.9\\\" -DPACKAGE_STRING=\\\"RT\\ 3.8.9\\\" -DPACKAGE_BUGREPORT=\\\"rt-bugs@bestpractica"\
-"l.com\\\" -DPACKAGE_URL=\\\"\\\""
+S["DEFS"]="-DPACKAGE_NAME=\\\"RT\\\" -DPACKAGE_TARNAME=\\\"rt\\\" -DPACKAGE_VERSION=\\\"3.8.10\\\" -DPACKAGE_STRING=\\\"RT\\ 3.8.10\\\" -DPACKAGE_BUGREPORT=\\\"rt-bugs@bestpracti"\
+"cal.com\\\" -DPACKAGE_URL=\\\"\\\""
S["mandir"]="man"
S["localedir"]="${datarootdir}/locale"
S["libdir"]="lib"
@@ -764,14 +773,14 @@ S["prefix"]="/opt/rt3"
S["exec_prefix"]="/opt/rt3"
S["PACKAGE_URL"]=""
S["PACKAGE_BUGREPORT"]="rt-bugs@bestpractical.com"
-S["PACKAGE_STRING"]="RT 3.8.9"
-S["PACKAGE_VERSION"]="3.8.9"
+S["PACKAGE_STRING"]="RT 3.8.10"
+S["PACKAGE_VERSION"]="3.8.10"
S["PACKAGE_TARNAME"]="rt"
S["PACKAGE_NAME"]="RT"
S["PATH_SEPARATOR"]=":"
S["SHELL"]="/bin/sh"
_ACAWK
-cat >>"$tmp/subs1.awk" <<_ACAWK &&
+cat >>"$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -801,8 +810,8 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
fi # test -n "$CONFIG_FILES"
@@ -815,7 +824,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -834,7 +843,7 @@ do
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -843,7 +852,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -869,8 +878,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -970,12 +979,20 @@ $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir set
s&@mandir@&man&g
s&\${datarootdir}&${prefix}/share&g' ;;
esac
-ac_sed_extra="/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}
@@ -994,23 +1011,24 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
diff --git a/rt/configure.ac b/rt/configure.ac
index 73738b359..e2b48aabe 100644
--- a/rt/configure.ac
+++ b/rt/configure.ac
@@ -3,11 +3,11 @@ dnl
dnl Process this file with autoconf to produce a configure script
dnl
dnl Embed in generated ./configure script the following CVS info:
-AC_REVISION($Revision: 1.3 $)dnl
+AC_REVISION($Revision: 1.4 $)dnl
dnl Setup autoconf
AC_PREREQ([2.53])
-AC_INIT(RT, 3.8.9, [rt-bugs@bestpractical.com])
+AC_INIT(RT, 3.8.10, [rt-bugs@bestpractical.com])
AC_CONFIG_SRCDIR([lib/RT.pm.in])
dnl Extract RT version number components
diff --git a/rt/lib/RT.pm b/rt/lib/RT.pm
index a9d4cdaf9..50723765e 100644
--- a/rt/lib/RT.pm
+++ b/rt/lib/RT.pm
@@ -57,7 +57,7 @@ use Cwd ();
use vars qw($Config $System $SystemUser $Nobody $Handle $Logger $_INSTALL_MODE);
-our $VERSION = '3.8.9';
+our $VERSION = '3.8.10';
@@ -713,9 +713,7 @@ L<DBIx::SearchBuilder>
=cut
-eval "require RT_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT_Vendor.pm});
-eval "require RT_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT_Local.pm});
+require RT::Base;
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT.pm.in b/rt/lib/RT.pm.in
index d881e1bfc..fafd2b778 100644
--- a/rt/lib/RT.pm.in
+++ b/rt/lib/RT.pm.in
@@ -713,9 +713,7 @@ L<DBIx::SearchBuilder>
=cut
-eval "require RT_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT_Vendor.pm});
-eval "require RT_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT_Local.pm});
+require RT::Base;
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Action.pm b/rt/lib/RT/Action.pm
index cb1eeccc8..963b454ac 100755
--- a/rt/lib/RT/Action.pm
+++ b/rt/lib/RT/Action.pm
@@ -230,9 +230,6 @@ sub DESTROY {
# }}}
-eval "require RT::Action_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action_Vendor.pm});
-eval "require RT::Action_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action_Local.pm});
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Action/CreateTickets.pm b/rt/lib/RT/Action/CreateTickets.pm
index 0a7eca3d8..5a1693569 100644
--- a/rt/lib/RT/Action/CreateTickets.pm
+++ b/rt/lib/RT/Action/CreateTickets.pm
@@ -1258,10 +1258,7 @@ sub Options {
)
}
-eval "require RT::Action::CreateTickets_Vendor";
-die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Action/CreateTickets_Vendor.pm} );
-eval "require RT::Action::CreateTickets_Local";
-die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Action/CreateTickets_Local.pm} );
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Action/EscalatePriority.pm b/rt/lib/RT/Action/EscalatePriority.pm
index 94d6e76f0..e15e50c84 100644
--- a/rt/lib/RT/Action/EscalatePriority.pm
+++ b/rt/lib/RT/Action/EscalatePriority.pm
@@ -163,9 +163,6 @@ sub Commit {
}
}
-eval "require RT::Action::EscalatePriority_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/EscalatePriority_Vendor.pm});
-eval "require RT::Action::EscalatePriority_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/EscalatePriority_Local.pm});
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Condition.pm b/rt/lib/RT/Condition.pm
index 2774fe823..2e0a94b92 100755
--- a/rt/lib/RT/Condition.pm
+++ b/rt/lib/RT/Condition.pm
@@ -238,9 +238,6 @@ sub DESTROY {
# }}}
-eval "require RT::Condition_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition_Vendor.pm});
-eval "require RT::Condition_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition_Local.pm});
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Config.pm b/rt/lib/RT/Config.pm
index e3bdbe90b..008afba7c 100644
--- a/rt/lib/RT/Config.pm
+++ b/rt/lib/RT/Config.pm
@@ -908,10 +908,11 @@ sub Meta {
sub Sections {
my $self = shift;
my %seen;
- return sort
+ my @sections = sort
grep !$seen{$_}++,
map $_->{'Section'} || 'General',
values %META;
+ return @sections;
}
sub Options {
@@ -940,14 +941,6 @@ sub Options {
return @res;
}
-eval "require RT::Config_Vendor";
-if ($@ && $@ !~ qr{^Can't locate RT/Config_Vendor.pm}) {
- die $@;
-};
-
-eval "require RT::Config_Local";
-if ($@ && $@ !~ qr{^Can't locate RT/Config_Local.pm}) {
- die $@;
-};
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/CustomField.pm b/rt/lib/RT/CustomField.pm
index e2563481f..c018356b2 100644
--- a/rt/lib/RT/CustomField.pm
+++ b/rt/lib/RT/CustomField.pm
@@ -388,24 +388,7 @@ sub _CoreAccessible {
}
};
-
- eval "require RT::CustomField_Overlay";
- if ($@ && $@ !~ qr{^Can't locate RT/CustomField_Overlay.pm}) {
- die $@;
- };
-
- eval "require RT::CustomField_Vendor";
- if ($@ && $@ !~ qr{^Can't locate RT/CustomField_Vendor.pm}) {
- die $@;
- };
-
- eval "require RT::CustomField_Local";
- if ($@ && $@ !~ qr{^Can't locate RT/CustomField_Local.pm}) {
- die $@;
- };
-
-
-
+RT::Base->_ImportOverlays();
=head1 SEE ALSO
diff --git a/rt/lib/RT/Date.pm b/rt/lib/RT/Date.pm
index e68526c07..384b74abc 100644
--- a/rt/lib/RT/Date.pm
+++ b/rt/lib/RT/Date.pm
@@ -1099,9 +1099,6 @@ sub Timezone {
}
-eval "require RT::Date_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Date_Vendor.pm});
-eval "require RT::Date_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Date_Local.pm});
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm
index 8dcacb14f..ff9d9b635 100644
--- a/rt/lib/RT/Interface/Web.pm
+++ b/rt/lib/RT/Interface/Web.pm
@@ -195,6 +195,8 @@ sub HandleRequest {
# Process session-related callbacks before any auth attempts
$HTML::Mason::Commands::m->callback( %$ARGS, CallbackName => 'Session', CallbackPage => '/autohandler' );
+ MaybeRejectPrivateComponentRequest();
+
MaybeShowNoAuthPage($ARGS);
AttemptExternalAuth($ARGS) if RT->Config->Get('WebExternalAuthContinuous') or not _UserLoggedIn();
@@ -412,6 +414,37 @@ sub MaybeShowNoAuthPage {
$m->abort;
}
+=head2 MaybeRejectPrivateComponentRequest
+
+This function will reject calls to private components, like those under
+C</Elements>. If the requested path is a private component then we will
+abort with a C<403> error.
+
+=cut
+
+sub MaybeRejectPrivateComponentRequest {
+ my $m = $HTML::Mason::Commands::m;
+ my $path = $m->request_comp->path;
+
+ # We do not check for dhandler here, because requesting our dhandlers
+ # directly is okay. Mason will invoke the dhandler with a dhandler_arg of
+ # 'dhandler'.
+
+ if ($path =~ m{
+ / # leading slash
+ ( Elements |
+ _elements | # mobile UI
+ Widgets |
+ autohandler | # requesting this directly is suspicious
+ l ) # loc component
+ ( $ | / ) # trailing slash or end of path
+ }xi) {
+ $m->abort(403);
+ }
+
+ return;
+}
+
=head2 ShowRequestedPage \%ARGS
This function, called exclusively by RT's autohandler, dispatches
@@ -796,8 +829,15 @@ sub SendStaticFile {
}
$type ||= "application/octet-stream";
}
+
+ # CGI.pm version 3.51 and 3.52 bang charset=iso-8859-1 onto our JS
+ # since we don't specify a charset
+ if ( $type =~ m{application/javascript} &&
+ $type !~ m{charset=([\w-]+)$} ) {
+ $type .= "; charset=utf-8";
+ }
$HTML::Mason::Commands::r->content_type($type);
- open my $fh, "<$file" or die "couldn't open file: $!";
+ open( my $fh, '<', $file ) or die "couldn't open file: $!";
binmode($fh);
{
local $/ = \16384;
@@ -841,8 +881,13 @@ sub StripContent {
# Check for plaintext sig
return '' if not $html and $content =~ /^(--)?\Q$sig\E$/;
- # Check for html-formatted sig
- RT::Interface::Web::EscapeUTF8( \$sig );
+ # Check for html-formatted sig; we don't use EscapeUTF8 here
+ # because we want to precisely match the escaping that FCKEditor
+ # uses. see also 311223f5, which fixed this for 4.0
+ $sig =~ s/&/&amp;/g;
+ $sig =~ s/</&lt;/g;
+ $sig =~ s/>/&gt;/g;
+
return ''
if $html
and $content =~ m{^(?:<p>)?(--)?\Q$sig\E(?:</p>)?$}s;
@@ -2272,9 +2317,6 @@ sub _parse_saved_search {
return ( _load_container_object( $obj_type, $obj_id ), $search_id );
}
-eval "require RT::Interface::Web_Vendor";
-die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Interface/Web_Vendor.pm} );
-eval "require RT::Interface::Web_Local";
-die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Interface/Web_Local.pm} );
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Principal_Overlay.pm b/rt/lib/RT/Principal_Overlay.pm
index f46525269..a8e8f3c42 100644
--- a/rt/lib/RT/Principal_Overlay.pm
+++ b/rt/lib/RT/Principal_Overlay.pm
@@ -220,9 +220,9 @@ sub RevokeRight {
# }}}
-# {{{ sub _CleanupInvalidDelegations
+# {{{ sub CleanupInvalidDelegations
-=head2 sub _CleanupInvalidDelegations { InsideTransaction => undef }
+=head2 sub CleanupInvalidDelegations { InsideTransaction => undef }
Revokes all ACE entries delegated by this principal which are
inconsistent with this principal's current delegation rights. Does
@@ -244,15 +244,19 @@ and logs an internal error if the deletion fails (should not happen).
# This is currently just a stub for the methods of the same name in
# RT::User and RT::Group.
-sub _CleanupInvalidDelegations {
+# backcompat for 3.8.8 and before
+*_CleanupInvalidDelegations = \&CleanupInvalidDelegations;
+
+sub CleanupInvalidDelegations {
my $self = shift;
unless ( $self->Id ) {
$RT::Logger->warning("Principal not loaded.");
return (undef);
}
- return ($self->Object->_CleanupInvalidDelegations(@_));
+ return ($self->Object->CleanupInvalidDelegations(@_));
}
+
# }}}
# {{{ sub HasRight
diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm
index ce46a90a6..121c08686 100755
--- a/rt/lib/RT/Record.pm
+++ b/rt/lib/RT/Record.pm
@@ -1988,9 +1988,6 @@ sub WikiBase {
return RT->Config->Get('WebPath'). "/index.html?q=";
}
-eval "require RT::Record_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Record_Vendor.pm});
-eval "require RT::Record_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Record_Local.pm});
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Search/Googleish.pm b/rt/lib/RT/Search/Googleish.pm
index 4232b434b..2e26a8da6 100644
--- a/rt/lib/RT/Search/Googleish.pm
+++ b/rt/lib/RT/Search/Googleish.pm
@@ -204,9 +204,6 @@ sub Prepare {
}
# }}}
-eval "require RT::Search::Googleish_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Search/Googleish_Vendor.pm});
-eval "require RT::Search::Googleish_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Search/Googleish_Local.pm});
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/SearchBuilder.pm b/rt/lib/RT/SearchBuilder.pm
index da542ea4e..ec4a223c0 100644
--- a/rt/lib/RT/SearchBuilder.pm
+++ b/rt/lib/RT/SearchBuilder.pm
@@ -85,6 +85,17 @@ sub _Init {
$self->SUPER::_Init( 'Handle' => $RT::Handle);
}
+sub OrderByCols {
+ my $self = shift;
+ my @sort;
+ for my $s (@_) {
+ next if defined $s->{FIELD} and $s->{FIELD} =~ /\W/;
+ $s->{FIELD} = $s->{FUNCTION} if $s->{FUNCTION};
+ push @sort, $s;
+ }
+ return $self->SUPER::OrderByCols( @sort );
+}
+
=head2 LimitToEnabled
Only find items that haven't been disabled
@@ -274,14 +285,47 @@ This Limit sub calls SUPER::Limit, but defaults "CASESENSITIVE" to 1, thus
making sure that by default lots of things don't do extra work trying to
match lower(colname) agaist lc($val);
+We also force VALUE to C<NULL> when the OPERATOR is C<IS> or C<IS NOT>.
+This ensures that we don't pass invalid SQL to the database or allow SQL
+injection attacks when we pass through user specified values.
+
=cut
sub Limit {
my $self = shift;
- my %args = ( CASESENSITIVE => 1,
- @_ );
+ my %ARGS = (
+ CASESENSITIVE => 1,
+ OPERATOR => '=',
+ @_,
+ );
- return $self->SUPER::Limit(%args);
+ # We use the same regex here that DBIx::SearchBuilder uses to exclude
+ # values from quoting
+ if ( $ARGS{'OPERATOR'} =~ /IS/i ) {
+ # Don't pass anything but NULL for IS and IS NOT
+ $ARGS{'VALUE'} = 'NULL';
+ }
+
+ if ($ARGS{FUNCTION}) {
+ ($ARGS{ALIAS}, $ARGS{FIELD}) = split /\./, delete $ARGS{FUNCTION}, 2;
+ $self->SUPER::Limit(%ARGS);
+ } elsif ($ARGS{FIELD} =~ /\W/
+ or $ARGS{OPERATOR} !~ /^(=|<|>|!=|<>|<=|>=
+ |(NOT\s*)?LIKE
+ |(NOT\s*)?(STARTS|ENDS)WITH
+ |(NOT\s*)?MATCHES
+ |IS(\s*NOT)?
+ |IN)$/ix) {
+ $RT::Logger->crit("Possible SQL injection attack: $ARGS{FIELD} $ARGS{OPERATOR}");
+ $self->SUPER::Limit(
+ %ARGS,
+ FIELD => 'id',
+ OPERATOR => '<',
+ VALUE => '0',
+ );
+ } else {
+ $self->SUPER::Limit(%ARGS);
+ }
}
=head2 ItemsOrderBy
@@ -345,9 +389,6 @@ sub _DoCount {
return $self->SUPER::_DoCount(@_);
}
-eval "require RT::SearchBuilder_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/SearchBuilder_Vendor.pm});
-eval "require RT::SearchBuilder_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/SearchBuilder_Local.pm});
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/System.pm b/rt/lib/RT/System.pm
index 8e5f96368..588be3e0d 100644
--- a/rt/lib/RT/System.pm
+++ b/rt/lib/RT/System.pm
@@ -211,9 +211,6 @@ sub QueueCacheNeedsUpdate {
}
}
-eval "require RT::System_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/System_Vendor.pm});
-eval "require RT::System_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/System_Local.pm});
+RT::Base->_ImportOverlays();
1;
diff --git a/rt/lib/RT/Test.pm b/rt/lib/RT/Test.pm
index 9954ec729..f7f3bf9a4 100644
--- a/rt/lib/RT/Test.pm
+++ b/rt/lib/RT/Test.pm
@@ -75,7 +75,7 @@ wrap 'HTTP::Request::Common::form_data',
};
-our @EXPORT = qw(is_empty);
+our @EXPORT = qw(is_empty parse_mail);
our ($port, $dbname);
our @SERVERS;
@@ -217,7 +217,7 @@ sub bootstrap_config {
$tmp{'config'}{'RT'} = File::Spec->catfile(
"$tmp{'directory'}", 'RT_SiteConfig.pm'
);
- open my $config, '>', $tmp{'config'}{'RT'}
+ open( my $config, '>', $tmp{'config'}{'RT'} )
or die "Couldn't open $tmp{'config'}{'RT'}: $!";
print $config qq{
@@ -246,7 +246,7 @@ Set( \$RTAddressRegexp , qr/^bad_re_that_doesnt_match\$/);
Set( \$MailCommand, sub {
my \$MIME = shift;
- open my \$handle, '>>', '$mail_catcher'
+ open( my \$handle, '>>', '$mail_catcher' )
or die "Unable to open '$mail_catcher' for appending: \$!";
\$MIME->print(\$handle);
@@ -272,7 +272,7 @@ sub bootstrap_logging {
$tmp{'log'}{'RT'} = File::Spec->catfile(
"$tmp{'directory'}", 'rt.debug.log'
);
- open my $fh, '>', $tmp{'log'}{'RT'}
+ open( my $fh, '>', $tmp{'log'}{'RT'} )
or die "Couldn't open $tmp{'config'}{'RT'}: $!";
# make world writable so apache under different user
# can write into it
@@ -303,7 +303,7 @@ sub set_config_wrapper {
SCALAR => '$',
);
my $sigil = $sigils{$type} || $sigils{'SCALAR'};
- open my $fh, '>>', $tmp{'config'}{'RT'}
+ open( my $fh, '>>', $tmp{'config'}{'RT'} )
or die "Couldn't open config file: $!";
require Data::Dumper;
my $dump = Data::Dumper::Dumper([@_[2 .. $#_]]);
@@ -774,7 +774,7 @@ sub open_mailgate_ok {
my $baseurl = shift;
my $queue = shift || 'general';
my $action = shift || 'correspond';
- Test::More::ok(open(my $mail, "|$RT::BinPath/rt-mailgate --url $baseurl --queue $queue --action $action"), "Opened the mailgate - $!");
+ Test::More::ok(open(my $mail, '|-', "$RT::BinPath/rt-mailgate --url $baseurl --queue $queue --action $action"), "Opened the mailgate - $!");
return $mail;
}
@@ -1072,7 +1072,7 @@ sub start_apache_server {
my %info = $self->apache_server_info( variant => $variant );
Test::More::diag(do {
- open my $fh, '<', $tmp{'config'}{'RT'};
+ open( my $fh, '<', $tmp{'config'}{'RT'} ) or die $!;
local $/;
<$fh>
});
@@ -1118,7 +1118,7 @@ sub start_apache_server {
}
Test::More::BAIL_OUT("Couldn't start apache server, no pid file")
unless -e $opt{'pid_file'};
- open my $pid_fh, '<', $opt{'pid_file'}
+ open( my $pid_fh, '<', $opt{'pid_file'} )
or Test::More::BAIL_OUT("Couldn't open pid file: $!");
my $pid = <$pid_fh>;
chomp $pid;
@@ -1230,7 +1230,7 @@ sub file_content {
Test::More::diag "reading content of '$path'" if $ENV{'TEST_VERBOSE'};
- open my $fh, "<:raw", $path
+ open( my $fh, "<:raw", $path )
or do {
warn "couldn't open file '$path': $!" unless $args{noexist};
return ''
@@ -1289,7 +1289,7 @@ sub process_in_file {
($out_fh, $out_conf) = tempfile();
} else {
$out_conf = $args{'out'};
- open $out_fh, '>', $out_conf
+ open( $out_fh, '>', $out_conf )
or die "couldn't open '$out_conf': $!";
}
print $out_fh $text;
@@ -1298,6 +1298,14 @@ sub process_in_file {
return ($out_fh, $out_conf);
}
+sub parse_mail {
+ my $mail = shift;
+ require RT::EmailParser;
+ my $parser = RT::EmailParser->new;
+ $parser->ParseMIMEEntityFromScalar( $mail );
+ return $parser->Entity;
+}
+
END {
my $Test = RT::Test->builder;
return if $Test->{Original_Pid} != $$;
diff --git a/rt/lib/RT/Ticket_Overlay.pm b/rt/lib/RT/Ticket_Overlay.pm
index 3ab31d3c2..2feed28dd 100644
--- a/rt/lib/RT/Ticket_Overlay.pm
+++ b/rt/lib/RT/Ticket_Overlay.pm
@@ -1014,15 +1014,14 @@ sub Import {
$self->OwnerGroup->_AddMember( PrincipalId => $Owner->PrincipalId );
- my $watcher;
- foreach $watcher ( @{ $args{'Cc'} } ) {
+ foreach my $watcher ( @{ $args{'Cc'} } ) {
$self->_AddWatcher( Type => 'Cc', Email => $watcher, Silent => 1 );
}
- foreach $watcher ( @{ $args{'AdminCc'} } ) {
+ foreach my $watcher ( @{ $args{'AdminCc'} } ) {
$self->_AddWatcher( Type => 'AdminCc', Email => $watcher,
Silent => 1 );
}
- foreach $watcher ( @{ $args{'Requestor'} } ) {
+ foreach my $watcher ( @{ $args{'Requestor'} } ) {
$self->_AddWatcher( Type => 'Requestor', Email => $watcher,
Silent => 1 );
}
diff --git a/rt/lib/RT/Tickets_Overlay.pm b/rt/lib/RT/Tickets_Overlay.pm
index ffbbc8539..c6cb9ab7e 100644
--- a/rt/lib/RT/Tickets_Overlay.pm
+++ b/rt/lib/RT/Tickets_Overlay.pm
@@ -150,6 +150,13 @@ our %FIELD_METADATA = (
Tagnum => [ 'FREESIDEFIELD', 'cust_tag' ],
);
+our %SEARCHABLE_SUBFIELDS = (
+ User => [qw(
+ EmailAddress Name RealName Nickname Organization Address1 Address2
+ WorkPhone HomePhone MobilePhone PagerPhone id
+ )],
+);
+
# Mapping of Field Type to Function
our %dispatch = (
ENUM => \&_EnumLimit,
@@ -837,6 +844,13 @@ sub _WatcherLimit {
my $type = $meta->[1] || '';
my $class = $meta->[2] || 'Ticket';
+ # Bail if the subfield is not allowed
+ if ( $rest{SUBKEY}
+ and not grep { $_ eq $rest{SUBKEY} } @{$SEARCHABLE_SUBFIELDS{'User'}})
+ {
+ die "Invalid watcher subfield: '$rest{SUBKEY}'";
+ }
+
# Owner was ENUM field, so "Owner = 'xxx'" allowed user to
# search by id and Name at the same time, this is workaround
# to preserve backward compatibility
@@ -1235,7 +1249,7 @@ Try and turn a CF descriptor into (cfid, cfname) object pair.
sub _CustomFieldDecipher {
my ($self, $string) = @_;
- my ($queue, $field, $column) = ($string =~ /^(?:(.+?)\.)?{(.+)}(?:\.(.+))?$/);
+ my ($queue, $field, $column) = ($string =~ /^(?:(.+?)\.)?{(.+)}(?:\.(Content|LargeContent))?$/);
$field ||= ($string =~ /^{(.*?)}$/)[0] || $string;
my $cf;
@@ -1767,9 +1781,20 @@ sub OrderByCols {
foreach my $uid ( $self->CurrentUser->Id, $RT::Nobody->Id ) {
if ( RT->Config->Get('DatabaseType') eq 'Oracle' ) {
my $f = ($row->{'ALIAS'} || 'main') .'.Owner';
- push @res, { %$row, ALIAS => '', FIELD => "CASE WHEN $f=$uid THEN 1 ELSE 0 END", ORDER => $order } ;
+ push @res, {
+ %$row,
+ FIELD => undef,
+ ALIAS => '',
+ FUNCTION => "CASE WHEN $f=$uid THEN 1 ELSE 0 END",
+ ORDER => $order
+ };
} else {
- push @res, { %$row, FIELD => "Owner=$uid", ORDER => $order } ;
+ push @res, {
+ %$row,
+ FIELD => undef,
+ FUNCTION => "Owner=$uid",
+ ORDER => $order
+ };
}
}
@@ -3300,9 +3325,9 @@ is a description of the purpose of that TicketRestriction
sub DescribeRestrictions {
my $self = shift;
- my ( $row, %listing );
+ my %listing;
- foreach $row ( keys %{ $self->{'TicketRestrictions'} } ) {
+ foreach my $row ( keys %{ $self->{'TicketRestrictions'} } ) {
$listing{$row} = $self->{'TicketRestrictions'}{$row}{'DESCRIPTION'};
}
return (%listing);
@@ -3377,9 +3402,8 @@ sub DeleteRestriction {
sub _RestrictionsToClauses {
my $self = shift;
- my $row;
my %clause;
- foreach $row ( keys %{ $self->{'TicketRestrictions'} } ) {
+ foreach my $row ( keys %{ $self->{'TicketRestrictions'} } ) {
my $restriction = $self->{'TicketRestrictions'}{$row};
# We need to reimplement the subclause aggregation that SearchBuilder does.
diff --git a/rt/lib/RT/User_Overlay.pm b/rt/lib/RT/User_Overlay.pm
index 17e9645de..37d138901 100644
--- a/rt/lib/RT/User_Overlay.pm
+++ b/rt/lib/RT/User_Overlay.pm
@@ -1807,7 +1807,7 @@ sub WatchedQueues {
}
-=head2 _CleanupInvalidDelegations { InsideTransaction => undef }
+=head2 CleanupInvalidDelegations { InsideTransaction => undef }
Revokes all ACE entries delegated by this user which are inconsistent
with their current delegation rights. Does not perform permission
@@ -1821,12 +1821,15 @@ and logs an internal error if the deletion fails (should not happen).
=cut
-# XXX Currently there is a _CleanupInvalidDelegations method in both
+# XXX Currently there is a CleanupInvalidDelegations method in both
# RT::User and RT::Group. If the recursive cleanup call for groups is
# ever unrolled and merged, this code will probably want to be
# factored out into RT::Principal.
-sub _CleanupInvalidDelegations {
+# backcompat for 3.8.8 and before
+*_CleanupInvalidDelegations = \&CleanupInvalidDelegations;
+
+sub CleanupInvalidDelegations {
my $self = shift;
my %args = ( InsideTransaction => undef,
@_ );
diff --git a/rt/lib/RT/Users_Overlay.pm b/rt/lib/RT/Users_Overlay.pm
index 4d03b6056..16ec5ed87 100644
--- a/rt/lib/RT/Users_Overlay.pm
+++ b/rt/lib/RT/Users_Overlay.pm
@@ -406,6 +406,12 @@ sub WhoHaveRoleRight
);
my @objects = $self->_GetEquivObjects( %args );
+
+ # RT::Principal->RolesWithRight only expects EquivObjects, so we need to
+ # fill it. At the very least it needs $args{Object}, which
+ # _GetEquivObjects above does for us.
+ unshift @{$args{'EquivObjects'}}, @objects;
+
my @roles = RT::Principal->RolesWithRight( %args );
unless ( @roles ) {
$self->_AddSubClause( "WhichRole", "(main.id = 0)" );
diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in
index d157a6b04..125708847 100644
--- a/rt/sbin/rt-setup-database.in
+++ b/rt/sbin/rt-setup-database.in
@@ -341,7 +341,7 @@ sub action_upgrade {
sub get_versions_from_to {
my ($base_dir, $from, $to) = @_;
- opendir my $dh, $base_dir or die "couldn't open dir: $!";
+ opendir( my $dh, $base_dir ) or die "couldn't open dir: $!";
my @versions = grep -d "$base_dir/$_" && /\d+\.\d+\.\d+/, readdir $dh;
closedir $dh;
diff --git a/rt/share/html/Admin/Elements/EditCustomFields b/rt/share/html/Admin/Elements/EditCustomFields
index bf65c9e37..91d5cffaa 100755
--- a/rt/share/html/Admin/Elements/EditCustomFields
+++ b/rt/share/html/Admin/Elements/EditCustomFields
@@ -59,10 +59,7 @@
Rows => 0,
Page => 1,
Format => $format,
- DisplayFormat =>
- $id
- ? ("'__RemoveCheckBox.{$id}__',". $format .", '__MoveCF.{$id}__'")
- : ("'__CheckBox.{RemoveCustomField}__',". $format .", '__MoveCF.{$id}__'"),
+ DisplayFormat => $display_format,
AllowSorting => 0,
ShowEmpty => 0,
PassArguments => [
@@ -151,6 +148,8 @@ if ( $UpdateCFs ) {
}
}
+$m->callback(CallbackName => 'UpdateExtraFields', Results => \@results, Object => $Object, %ARGS);
+
my $applied_cfs = RT::CustomFields->new( $session{'CurrentUser'} );
$applied_cfs->LimitToLookupType($lookup);
$applied_cfs->LimitToGlobalOrObjectId($id);
@@ -162,6 +161,11 @@ $not_applied_cfs->LimitToNotApplied( $id ? ($id, 0) : (0) );
my $format = RT->Config->Get('AdminSearchResultFormat')->{'CustomFields'};
+my $display_format = $id
+ ? ("'__RemoveCheckBox.{$id}__',". $format .", '__MoveCF.{$id}__'")
+ : ("'__CheckBox.{RemoveCustomField}__',". $format .", '__MoveCF.{$id}__'");
+$m->callback(CallbackName => 'EditDisplayFormat', DisplayFormat => \$display_format, id => $id);
+
</%INIT>
<%ARGS>
$Object