Re: [rt-users] Issues with RT4.x and apache proxypass and white space in search results.

2013-04-18 Thread Peter Boguszewski
I can replicate this problem with RT 4.0.11 in many ways.  I have tried 
apache 2.2.x and 2.4.x with ProxyPass and ReWrite rules with the 
NoEscape option [NE].  This does not fix the problem.  Here is the exact 
way to replicate the issue.


With ProxyPass enabled go to Query Builder and add any search term, 
select Add these terms and Search.  This will blow up with a URL that 
contains escape characters like this:


Search/Results.html?Format=%2527%2520%2520%2520%253Cb%253E%253Ca%2520href%253D%2522__WebPath__%252FTicket%252FDisplay.html%253Fid%253D__id__%2522%253E__id__%253C%252Fa%253E%253C%252Fb%253E%252FTITLE%253A%2523%2527%252C%250A%2527%253Cb%253E%253Ca%2520href%253D%2522__WebPath__%252FTicket%252FDisplay.html%253Fid%253D__id__%2522%253E__Subject__%253C%252Fa%253E%253C%252Fb%253E%252FTITLE%253ASubject%2527%252C%250A%2527__Status__%2527%252C%250A%2527__QueueName__%2527%252C%250A%2527__OwnerName__%2527%252C%250A%2527__Priority__%2527%252C%250A%2527__NEWLINE__%2527%252C%250A%2527%2527%252C%250A%2527%253Csmall%253E__Requestors__%253C%252Fsmall%253E%2527%252C%250A%2527%253Csmall%253E__CreatedRelative__%253C%252Fsmall%253E%2527%252C%250A%2527%253Csmall%253E__ToldRelative__%253C%252Fsmall%253E%2527%252C%250A%2527%253Csmall%253E__LastUpdatedRelative__%253C%252Fsmall%253E%2527%252C%250A%2527%253Csmall%253E__TimeLeft__%253C%252Fsmall%253E%2527Order=ASC%257CASC%257CASC%257CASCOrderBy=id%257C%257C%257CQuery=id%2520%253C%25202000RowsPerPage=50SavedChartSearchId=newSavedSearchId=new

Without changing anything I can get the search to work by going back to 
the query builder and adding a search term but instead of choosing Add 
these terms and Search I select Add these terms then the click the 
Show Results link that appears.  Here is the same exact search result URL:


Search/Results.html?SavedChartSearchId=newRowsPerPage=50Page=Format='+++ba+href%3D__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__idid__%2Fa%2Fb%2FTITLE%3A%23'%2C%0A'ba+href%3D__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__idSubject__%2Fa%2Fb%2FTITLE%3ASubject'%2C%0A'__Status__'%2C%0A'__QueueName__'%2C%0A'__OwnerName__'%2C%0A'__Priority__'%2C%0A'__NEWLINE__'%2C%0A''%2C%0A'small__Requestors__%2Fsmall'%2C%0A'small__CreatedRelative__%2Fsmall'%2C%0A'small__ToldRelative__%2Fsmall'%2C%0A'small__LastUpdatedRelative__%2Fsmall'%2C%0A'small__TimeLeft__%2Fsmall'Order=ASC|ASC|ASC|ASCSavedSearchId=Query=id++2000OrderBy=id|||

The difference I notice in the code is that the Add these terms and 
Search button uses a perl url redirect where the Show Results link 
does not.  Here is the log output from the errored search (with server 
location starred out):


[Thu Apr 18 16:52:51 2013] [error]: The 'message' parameter (Wrong 
query, expecting a OPERATOR in 'id%20--here%3C%202000' at 
/*//rt-4.0.11/sbin/../lib/RT/SQL.pm line 135.


Stack:
  [/*//rt-4.0.11/sbin/../lib/RT/SQL.pm:135]
  [/*//rt-4.0.11/sbin/../lib/RT/Tickets_SQL.pm:237]
  [/*//rt-4.0.11/sbin/../lib/RT/Tickets_SQL.pm:293]
  [/*//rt-4.0.11/share/html/Search/Results.html:109]
  [/*//rt-4.0.11/sbin/../lib/RT/Interface/Web.pm:635]
  [/*//rt-4.0.11/sbin/../lib/RT/Interface/Web.pm:336]
  [/*//rt-4.0.11/share/html/autohandler:53]
) to Log::Dispatch::Output::log was a 'hashref object', which is not 
one of the allowed types: scalar
 at 
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Params/Validate/XS.pm 
line 11.
Params::Validate::XS::__ANON__('The \'message\' parameter 
(Wrong query, expecting a OPERATOR...') called at 
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch/Output.pm line 39
Log::Dispatch::Output::log(undef, 'level', 'error', 'name', 
'screen', 'message', 'HTML::Mason::Exception=HASH(0x6a95280)') called at 
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch.pm line 214
Log::Dispatch::_log_to('Log::Dispatch=HASH(0xb84808)', 'level', 
'error', 'name', 'screen', 'message', 
'HTML::Mason::Exception=HASH(0x6a95280)') called at 
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch.pm line 167
Log::Dispatch::_log_to_outputs('Log::Dispatch=HASH(0xb84808)', 'level', 
'error', 'message', 'HTML::Mason::Exception=HASH(0x6a95280)') called at 
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch.pm line 145
Log::Dispatch::log('Log::Dispatch=HASH(0xb84808)', 'level', 
'error', 'message', '') called at 
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch.pm line 42
Log::Dispatch::__ANON__('Log::Dispatch=HASH(0xb84808)', '') 
called at /*//rt-4.0.11/sbin/../lib/RT/Tickets_SQL.pm line 295
RT::Tickets::FromSQL('RT::Tickets=HASH(0x689e1a0)', 
'id%20%3C%202000') called at 
/*//rt-4.0.11/share/html/Search/Results.html line 109
HTML::Mason::Commands::__ANON__('Order', 
'ASC%7CASC%7CASC%7CASC', 'Query', 'id%20%3C%202000', 'SavedSearchId', 
'new', 'SavedChartSearchId', 'new', 'OrderBy', ...) called at 
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/HTML/Mason/Component.pm 
line 138

Re: [rt-users] Issues with RT4.x and apache proxypass and white space in search results.

2013-04-18 Thread Thomas Sibley
On 04/18/2013 09:54 AM, Peter Boguszewski wrote:
 I can replicate this problem with RT 4.0.11 in many ways.  I have tried
 apache 2.2.x and 2.4.x with ProxyPass and ReWrite rules with the
 NoEscape option [NE].  This does not fix the problem.  Here is the exact
 way to replicate the issue.
 
 With ProxyPass enabled go to Query Builder and add any search term,
 select Add these terms and Search.  This will blow up with a URL that
 contains escape characters like this:

That doesn't happen in an Apache config using ProxyPass for me.

Please show your full Apache config and tell us about the backend server
you're proxying to.


[rt-users] Issues with RT4.x and apache proxypass and white space in search results.

2013-04-16 Thread Peter Boguszewski

Hi all,
We would like to proxypass traffic for RT for various reasons. This 
works perfectly for most applications and for about 95% of RT. The issue 
is in the Query Builder.  The Results.html contains spaces in the URL.  
This causes problems for Apache's proxypass / proxypassreverse.  It 
replaces white spaces with %2x and RT blows up with this error: An 
internal RT error has occurred. Your administrator can find more details 
in RT's log files.  Does anyone know how to fix this issue?


Thanks,

Pete

--
Peter Boguszewski
Technical Manager of Library Systems
UW Madison - Library Technology Group
pboguszew...@library.wisc.edu
608.262.4768



Re: [rt-users] Issues with RT4.x and apache proxypass and white space in search results.

2013-04-16 Thread Kevin Falcone
On Tue, Apr 16, 2013 at 09:52:29AM -0500, Peter Boguszewski wrote:
 We would like to proxypass traffic for RT for various reasons.
 This works perfectly for most applications and for about 95% of RT.
 The issue is in the Query Builder.  The Results.html contains spaces
 in the URL.  This causes problems for Apache's proxypass /
 proxypassreverse.  It replaces white spaces with %2x and RT blows up
 with this error: An internal RT error has occurred. Your
 administrator can find more details in RT's log files.  Does anyone
 know how to fix this issue?

You left out your actual RT version.
Using 4.0.11 and a proxypass configuration, I don't see *any*
unescaped whitespace when using the Query Builder.

Also - you can always look in the backend RT server's logs to see the
full error.  This is the only real way to debug what you're seeing.

-kevin


pgp0EVxscfQ8B.pgp
Description: PGP signature