Swazoo incorrectly parses query containing url encoded characters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Swazoo incorrectly parses query containing url encoded characters

Nick
Hi,

I've hit the multiple url decode bug referred to in the following reports:


which should be fixed in: ConfigurationOfSwazoo2 2.2.0.4, which I loaded with:

ConfigurationOfSwazoo2 project latestVersion: #development) load

unfortunately it didn't fix my problem. 
I've checked-in a test to demonstrate the issue: Swazoo-2.2.gemstone-NickAger.33

testDoubleDecode
| decodedUrl |
self assert: (decodedUrl queryAt: '23') = 'Swazoo had problems decoding this: +/about/syntax/presaleJpg|style=display:block+'

which fails....

I found a fix by removing the HTTPString decodedHTTPFrom: from SwazooURI>>#readQueryFrom: however the issue is marked as fixed, so perhaps I've missed something...

I'm also hitting a similar issue with the FastCGI server, but I haven't investigated that yet...

Have I missed something?

Nick


Reply | Threaded
Open this post in threaded view
|

Re: Swazoo incorrectly parses query containing url encoded characters

Dale Henrichs
Nick,

I "fixed" the issue by avoiding the use of fromString: which is the culprit as you have noted ... your fix is better one than mine, so you didn't miss anything...I can't give you a good reason for why I didn't just remove the extra decode ...

Do you have a stack trace for Swazoo and FastCGI that exposes the problem ... I saw the issue in Swazoo and didn't see the same problem using FastCGI, so I assume you are coming at the  url from a different direction...

Dale

----- Original Message -----
| From: "Nick Ager" <[hidden email]>
| To: "GemStone Seaside beta discussion" <[hidden email]>
| Sent: Tuesday, August 16, 2011 2:57:09 PM
| Subject: [GS/SS Beta] Swazoo incorrectly parses query containing url encoded characters
|
| Hi,
|
|
| I've hit the multiple url decode bug referred to in the following
| reports:
|
|
| http://code.google.com/p/glassdb/issues/detail?id=283
| http://code.google.com/p/seaside/issues/detail?id=674
|
|
| which should be fixed in: ConfigurationOfSwazoo2 2.2.0.4, which I
| loaded with:
|
|
| ConfigurationOfSwazoo2 project latestVersion: #development) load
|
|
| unfortunately it didn't fix my problem.
| I've checked-in a test to demonstrate the issue:
| Swazoo-2.2.gemstone-NickAger.33
|
|
| testDoubleDecode
|
| | decodedUrl |
| decodedUrl := SwazooURI fromString:'
| http://localhost:8083/pier/about/syntax?_s=vCr1VQ5SzWLx_wOW&_k=YjbgFK5ZQk23dGo7&command=PREditCommand&18&23=Swazoo+had+problems+decoding+this%3A+%2B%2Fabout%2Fsyntax%2FpresaleJpg%7Cstyle%3Ddisplay%3Ablock%2B&_=1313530452863
| '.
| self assert: (decodedUrl queryAt: '23') = 'Swazoo had problems
| decoding this: +/about/syntax/presaleJpg|style=display:block+'
|
|
| which fails....
|
|
| I found a fix by removing the HTTPString decodedHTTPFrom: from
| SwazooURI>>#readQueryFrom: however the issue is marked as fixed, so
| perhaps I've missed something...
|
|
| I'm also hitting a similar issue with the FastCGI server, but I
| haven't investigated that yet...
|
|
| Have I missed something?
|
|
| Nick
|
|
|
|
Reply | Threaded
Open this post in threaded view
|

Re: Swazoo incorrectly parses query containing url encoded characters

Nick
Hi Dale,
 
I "fixed" the issue by avoiding the use of fromString: which is the culprit as you have noted ... your fix is better one than mine, so you didn't miss anything...I can't give you a good reason for why I didn't just remove the extra decode ...

Investigating further I'm not so sure if my fix is a good or not. It depends on whether you expect the server to decode the URI or server adaptor.
 

Do you have a stack trace for Swazoo and FastCGI that exposes the problem ... I saw the issue in Swazoo and didn't see the same problem using FastCGI, so I assume you are coming at the  url from a different direction...

Below is a stack trace which includes the fixes from ConfigurationOfSwazoo2 2.2.0.4. The double decode occurs in a call to WAUrl class>>decodePercent: , which I guess answers my question above, in that the server adaptor must create a WAUrl object, which decodes the url on construction, so therefore the url should be passed into the server adaptor undecoded... is my guess.

[1] Halt | defaultAction
_topOfStack: System
receiver: #halt encountered
[2] Halt (ExceptionA) | _defaultAction
myResult: nil
receiver: #halt encountered
[3] Halt (ExceptionA) | signal
gsException: nil
receiver: #halt encountered
[4] Halt (ControlInterrupt) | signal
receiver: #halt encountered
[5] Halt (ExceptionA) | signal:
signalText: '#halt encountered'
receiver: #halt encountered
[6] Halt class (ExceptionA class) | signal:
signalText: '#halt encountered'
receiver: Halt
[7] Halt class (ControlInterrupt class) | signal:
signalText: '#halt encountered'
receiver: Halt
[8] WAUrl class (Object) | halt:
messageString: '#halt encountered'
receiver: WAUrl
[9] WAUrl class (Object) | halt
receiver: WAUrl
[10] WAUrl class | decodePercent:
aString: 'Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  
'
input: anAnsiReadStream
output: aWriteStream
char: $

receiver: WAUrl
[11] WAUrl | decode:
aString: 'Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  
'
receiver: /?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=
[12] WAUrl | parseQuery:
aString: '_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  
'
input: anAnsiReadStream
string: '32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  
'
index: 3
_temp1: /?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=
_temp2: '32'
receiver: /?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=
[13] WAUrl | initializeFromString:
aString: '/blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  
'
string: '/blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  
'
index: 14
receiver: /?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=
[14] WAUrl class | absolute:
aString: '/blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  
'
receiver: WAUrl
[15] WAGsSwazooAdaptor (WASwazooAdaptor) | requestUrlFor:
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
url: nil
receiver: aWAGsSwazooAdaptor
[16] WAGsSwazooAdaptor (WAServerAdaptor) | requestFor:
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
_temp1: WARequest
_temp2: 'GET'
receiver: aWAGsSwazooAdaptor
[17] WAGsSwazooAdaptor (WAServerAdaptor) | contextFor:
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
_temp1: WAGemStoneRequestContext
receiver: aWAGsSwazooAdaptor
[18] WAGsSwazooAdaptor (WAServerAdaptor) | process:
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
context: nil
_temp1: 5233412686671878
receiver: aWAGsSwazooAdaptor
[19] [] in WAGsSwazooAdaptor | process:
aRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
receiver: aComplexBlock
[20] [] in GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock:
conflicts: nil
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
resultBlock: aComplexBlock
result: nil
retryRequest: false
retryException: nil
receiver: aComplexBlock
[21] ExceptionHandler | doTryBlock:
aBlock: aComplexBlock
result: nil
_temp1: 5233410539188230
receiver: anExceptionHandler
[22] ExceptionHandler | try:on:do:
aBlock: aComplexBlock
anExceptionSelector: anExceptionSet
anotherBlock: aComplexBlock
protectedBlock: aComplexBlock
newBlock: nil
_temp1: 5233408391704582
receiver: anExceptionHandler
[23] [] in ExecutableBlock | on:do:
_temp1: anExceptionSet
_temp2: aComplexBlock
conflicts: nil
selector: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
action: aComplexBlock
receiver: aComplexBlock
[24] [] in GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock:
conflicts: nil
_temp1: 5233406244220934
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
resultBlock: aComplexBlock
result: nil
retryRequest: false
retryException: nil
receiver: aComplexVCBlock
[25] [] in ExecutableBlock | ensure:
conflicts: aComplexBlock
aBlock: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
result: aComplexBlock
receiver: aComplexBlock
[26] [] in ExecutableBlock | ensure:
conflicts: aComplexBlock
_temp1: nil
_temp2: 5233404096737286
aBlock: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
result: aComplexBlock
receiver: aComplexVCBlock
[27] TransientRecursionLock | critical:
aBlock: aComplexVCBlock
_temp1: 5233401949253638
receiver: aTransientRecursionLock
[28] GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock:
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
resultBlock: aComplexBlock
result: nil
retryRequest: false
retryException: nil
_temp1: 5233399801769990
receiver: aGRGemStonePlatform
[29] [] in GRGemStonePlatform | seasideProcessRequest:adaptor:resultBlock:
retryCount: 10
result: nil
count: 1
_temp1: 10
_temp2: 1
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
adaptor: aWAGsSwazooAdaptor
resultBlock: aComplexBlock
receiver: aComplexBlock
[30] ExceptionHandler | doTryBlock:
aBlock: aComplexBlock
result: nil
_temp1: 5233397654286342
receiver: anExceptionHandler
[31] ExceptionHandler | try:on:do:
aBlock: aComplexBlock
anExceptionSelector: Error
anotherBlock: aComplexBlock
protectedBlock: aComplexBlock
newBlock: nil
_temp1: 5233395506802694
receiver: anExceptionHandler
[32] [] in ExecutableBlock | on:do:
retryCount: Error
result: aComplexBlock
count: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
selector: aWAGsSwazooAdaptor
action: nil
receiver: aComplexBlock
[33] GRGemStonePlatform | seasideProcessRequest:adaptor:resultBlock:
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
adaptor: aWAGsSwazooAdaptor
resultBlock: aComplexBlock
result: nil
_temp1: 5233393359319046
receiver: aGRGemStonePlatform
[34] WAGsSwazooAdaptor | process:
aNativeRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
_temp1: 5233391211835398
receiver: aWAGsSwazooAdaptor
[35] WAPluggableSite | answerTo:
aSwazooRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
receiver: aWAPluggableSite
[36] WAPluggableSite | helpResolve:
aResolution: anURIResolution
receiver: aWAPluggableSite
[37] URIResolution | visitResource:
aResource: aWAPluggableSite
receiver: anURIResolution
[38] [] in URIResolution | visitChildrenOf:advancing:
each: aWAPluggableSite
aResource: aServerRootComposite
aBoolean: false
response: nil
receiver: aComplexBlock
[39] OrderedCollection (Collection) | do:
aBlock: aComplexBlock
i: 1
_temp1: 1
_temp2: 1
_temp3: 1
receiver: anOrderedCollection( aWAPluggableSite)
[40] URIResolution | visitChildrenOf:advancing:
aResource: aServerRootComposite
aBoolean: false
response: nil
_temp1: 5233367589515270
receiver: anURIResolution
[41] URIResolution | resolveTransparentComposite:
aCompositeResource: aServerRootComposite
receiver: anURIResolution
[42] URIResolution | resolveServerRoot:
aServerRoot: aServerRootComposite
receiver: anURIResolution
[43] ServerRootComposite | helpResolve:
aResolution: anURIResolution
receiver: aServerRootComposite
[44] URIResolution | visitResource:
aResource: aServerRootComposite
receiver: anURIResolution
[45] URIResolution class | resolveRequest:startingAt:
aRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
aResource: aServerRootComposite
receiver: URIResolution
[46] HTTPServer | answerTo:
aRequest: a HTTPRequest GET HTTP/1.0
from: 127.0.0.1
at: aSpTimestamp
host: 127.0.0.1
url: /blog/simple/?_s=UrEm76IJ-WOw1SXl&_k=PF2as8374sOuV0dH&command=PREditCommand&27=&32=Swazoo had problems decoding this:

  +/blog/simple/presaleJpg|style=display:block+  

browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
connection: close
response: nil
receiver: aHTTPServer
[47] [] in HTTPConnection | produceResponseFor:
_temp1: aSwazooTask
aSwazooTask: aSwazooTask
receiver: aComplexBlock
[48] ExceptionHandler | doTryBlock:
aBlock: aComplexBlock
result: nil
_temp1: 5233365442031622
receiver: anExceptionHandler
[49] ExceptionHandler | try:on:do:
aBlock: aComplexBlock
anExceptionSelector: Error
anotherBlock: aComplexBlock
protectedBlock: aComplexBlock
newBlock: nil
_temp1: 5233363294547974
receiver: anExceptionHandler
[50] [] in ExecutableBlock | on:do:
_temp1: Error
_temp2: aComplexBlock
selector: aSwazooTask
action: 5233361147064326
receiver: aComplexBlock
[51] HTTPConnection | produceResponseFor:
aSwazooTask: aSwazooTask
_temp1: 5233361147064326
receiver: aHTTPConnection
[52] HTTPConnection | getAndDispatchMessages
receiver: aHTTPConnection
[53] [] in HTTPConnection | interact
interactionBlock: aComplexVCBlock
receiver: aComplexBlock
[54] ExceptionHandler | doTryBlock:
aBlock: aComplexBlock
result: nil
_temp1: 4996485110755334
receiver: anExceptionHandler
[55] ExceptionHandler | try:on:do:
aBlock: aComplexBlock
anExceptionSelector: Error
anotherBlock: aComplexBlock
protectedBlock: aComplexBlock
newBlock: nil
_temp1: 4996482963271686
receiver: anExceptionHandler
[56] [] in ExecutableBlock | on:do:
_temp1: Error
_temp2: aComplexBlock
selector: aComplexVCBlock
action: 4996472225853446
receiver: aComplexBlock
[57] [] in HTTPConnection | interact
_temp1: 4996480815788038
interactionBlock: aComplexVCBlock
receiver: aComplexVCBlock
[58] [] in ExecutableBlock | ifCurtailed:
aBlock: aComplexVCBlock
wasCurtailed: 4996472225853446
receiver: aComplexBlock
[59] [] in ExecutableBlock | ensure:
aBlock: aComplexVCBlock
result: 4996472225853446
receiver: aComplexBlock
[60] [] in ExecutableBlock | ensure:
_temp1: aComplexBlock
_temp2: nil
_temp3: 4996478668304390
aBlock: aComplexVCBlock
result: 4996472225853446
receiver: aComplexBlock
[61] [] in ExecutableBlock | ifCurtailed:
_temp1: aComplexBlock
_temp2: true
_temp3: 4996476520820742
aBlock: aComplexVCBlock
wasCurtailed: 4996472225853446
receiver: aComplexVCBlock
[62] [] in HTTPConnection | interact
_temp1: 4996474373337094
interactionBlock: aComplexVCBlock
receiver: aComplexVCBlock
[63] HTTPConnection | interact
interactionBlock: aComplexVCBlock
_temp1: 4996472225853446
receiver: aHTTPConnection
[64] HTTPServer | acceptConnection
clientConnection: aHTTPConnection
_temp1: 4996452898500614
receiver: aHTTPServer
[65] [] in HTTPServer | start
receiver: aComplexBlock
[66] [] in BlockClosure | repeat
receiver: aComplexBlock
[67] [] in HTTPServer | start
_temp1: 3385217392242694
receiver: aComplexVCBlock
[68] GsProcess | _startPart2
_temp1: 3385215244759046
receiver: GsProcess(oop=315861761, status=debug, priority=10, group=1, block=aComplexVCBlock, args=anArray( ), 
Halt | defaultAction @8 line 3
Halt (ExceptionA) | _defaultAction @1 line 4
Halt (ExceptionA) | signal @7 line 37
Halt (ControlInterrupt) | signal @4 line 6
Halt (ExceptionA) | signal: @3 line 12
Halt class (ExceptionA class) | signal: @2 line 3
Halt class (ControlInterrupt class) | signal: @4 line 6
WAUrl class (Object) | halt: @3 line 7
WAUrl class (Object) | halt @1 line 6
WAUrl class | decodePercent: @29 line 16
WAUrl | decode: @2 line 3
WAUrl | parseQuery: @18 line 12
WAUrl | initializeFromString: @22 line 11
WAUrl class | absolute: @2 line 4
WAGsSwazooAdaptor (WASwazooAdaptor) | requestUrlFor: @4 line 3
WAGsSwazooAdaptor (WAServerAdaptor) | requestFor: @3 line 6
WAGsSwazooAdaptor (WAServerAdaptor) | contextFor: @2 line 5
WAGsSwazooAdaptor (WAServerAdaptor) | process: @2 line 5
[] in WAGsSwazooAdaptor | process: @3 line 6
[] in GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock: @12 line 11
ExceptionHandler | doTryBlock: @9 line 7
ExceptionHandler | try:on:do: @15 line 18
[] in ExecutableBlock | on:do: @2 line 8
[] in GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock: @18 line 12
[] in ExecutableBlock | ensure: @4 line 11
[] in ExecutableBlock | ensure: @6 line 11
TransientRecursionLock | critical: @15 line 8
GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock: @43 line 5
[] in GRGemStonePlatform | seasideProcessRequest:adaptor:resultBlock: @7 line 9
ExceptionHandler | doTryBlock: @9 line 7
ExceptionHandler | try:on:do: @15 line 18
[] in ExecutableBlock | on:do: @2 line 8
GRGemStonePlatform | seasideProcessRequest:adaptor:resultBlock: @32 line 17
WAGsSwazooAdaptor | process: @4 line 4
WAPluggableSite | answerTo: @2 line 2
WAPluggableSite | helpResolve: @7 line 3
URIResolution | visitResource: @1 line 2
[] in URIResolution | visitChildrenOf:advancing: @10 line 7
OrderedCollection (Collection) | do: @5 line 10
URIResolution | visitChildrenOf:advancing: @15 line 5
URIResolution | resolveTransparentComposite: @2 line 2
URIResolution | resolveServerRoot: @1 line 2
ServerRootComposite | helpResolve: @1 line 2
URIResolution | visitResource: @1 line 2
URIResolution class | resolveRequest:startingAt: @3 line 2
HTTPServer | answerTo: @3 line 3
[] in HTTPConnection | produceResponseFor: @9 line 5
ExceptionHandler | doTryBlock: @9 line 7
ExceptionHandler | try:on:do: @15 line 18
[] in ExecutableBlock | on:do: @2 line 8
HTTPConnection | produceResponseFor: @23 line 6
HTTPConnection | getAndDispatchMessages @9 line 9
[] in HTTPConnection | interact @7 line 6
ExceptionHandler | doTryBlock: @9 line 7
ExceptionHandler | try:on:do: @15 line 18
[] in ExecutableBlock | on:do: @2 line 8
[] in HTTPConnection | interact @12 line 9
[] in ExecutableBlock | ifCurtailed: @4 line 6
[] in ExecutableBlock | ensure: @4 line 11
[] in ExecutableBlock | ensure: @6 line 11
[] in ExecutableBlock | ifCurtailed: @8 line 8
[] in HTTPConnection | interact @19 line 13
HTTPConnection | interact @26 line 18
HTTPServer | acceptConnection @14 line 13
[] in HTTPServer | start @13 line 6
[] in BlockClosure | repeat @3 line 5
[] in HTTPServer | start @14 line 6
GsProcess | _startPart2 @15 line 17
GsProcess | _start @1 line 9
)
[69] GsProcess | _start
receiver: GsProcess(oop=315861761, status=debug, priority=10, group=1, block=aComplexVCBlock, args=anArray( ), 
Halt | defaultAction @8 line 3
Halt (ExceptionA) | _defaultAction @1 line 4
Halt (ExceptionA) | signal @7 line 37
Halt (ControlInterrupt) | signal @4 line 6
Halt (ExceptionA) | signal: @3 line 12
Halt class (ExceptionA class) | signal: @2 line 3
Halt class (ControlInterrupt class) | signal: @4 line 6
WAUrl class (Object) | halt: @3 line 7
WAUrl class (Object) | halt @1 line 6
WAUrl class | decodePercent: @29 line 16
WAUrl | decode: @2 line 3
WAUrl | parseQuery: @18 line 12
WAUrl | initializeFromString: @22 line 11
WAUrl class | absolute: @2 line 4
WAGsSwazooAdaptor (WASwazooAdaptor) | requestUrlFor: @4 line 3
WAGsSwazooAdaptor (WAServerAdaptor) | requestFor: @3 line 6
WAGsSwazooAdaptor (WAServerAdaptor) | contextFor: @2 line 5
WAGsSwazooAdaptor (WAServerAdaptor) | process: @2 line 5
[] in WAGsSwazooAdaptor | process: @3 line 6
[] in GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock: @12 line 11
ExceptionHandler | doTryBlock: @9 line 7
ExceptionHandler | try:on:do: @15 line 18
[] in ExecutableBlock | on:do: @2 line 8
[] in GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock: @18 line 12
[] in ExecutableBlock | ensure: @4 line 11
[] in ExecutableBlock | ensure: @6 line 11
TransientRecursionLock | critical: @15 line 8
GRGemStonePlatform | seasideProcessRequestWithRetry:resultBlock: @43 line 5
[] in GRGemStonePlatform | seasideProcessRequest:adaptor:resultBlock: @7 line 9
ExceptionHandler | doTryBlock: @9 line 7
ExceptionHandler | try:on:do: @15 line 18
[] in ExecutableBlock | on:do: @2 line 8
GRGemStonePlatform | seasideProcessRequest:adaptor:resultBlock: @32 line 17
WAGsSwazooAdaptor | process: @4 line 4
WAPluggableSite | answerTo: @2 line 2
WAPluggableSite | helpResolve: @7 line 3
URIResolution | visitResource: @1 line 2
[] in URIResolution | visitChildrenOf:advancing: @10 line 7
OrderedCollection (Collection) | do: @5 line 10
URIResolution | visitChildrenOf:advancing: @15 line 5
URIResolution | resolveTransparentComposite: @2 line 2
URIResolution | resolveServerRoot: @1 line 2
ServerRootComposite | helpResolve: @1 line 2
URIResolution | visitResource: @1 line 2
URIResolution class | resolveRequest:startingAt: @3 line 2
HTTPServer | answerTo: @3 line 3
[] in HTTPConnection | produceResponseFor: @9 line 5
ExceptionHandler | doTryBlock: @9 line 7
ExceptionHandler | try:on:do: @15 line 18
[] in ExecutableBlock | on:do: @2 line 8
HTTPConnection | produceResponseFor: @23 line 6
HTTPConnection | getAndDispatchMessages @9 line 9
[] in HTTPConnection | interact @7 line 6
ExceptionHandler | doTryBlock: @9 line 7
ExceptionHandler | try:on:do: @15 line 18
[] in ExecutableBlock | on:do: @2 line 8
[] in HTTPConnection | interact @12 line 9
[] in ExecutableBlock | ifCurtailed: @4 line 6
[] in ExecutableBlock | ensure: @4 line 11
[] in ExecutableBlock | ensure: @6 line 11
[] in ExecutableBlock | ifCurtailed: @8 line 8
[] in HTTPConnection | interact @19 line 13
HTTPConnection | interact @26 line 18
HTTPServer | acceptConnection @14 line 13
[] in HTTPServer | start @13 line 6
[] in BlockClosure | repeat @3 line 5
[] in HTTPServer | start @14 line 6
GsProcess | _startPart2 @15 line 17
GsProcess | _start @1 line 9
)

Reply | Threaded
Open this post in threaded view
|

Re: Swazoo incorrectly parses query containing url encoded characters

Philippe Marschall
In reply to this post by Nick
2011/8/16 Nick Ager <[hidden email]>:

> Hi,
> I've hit the multiple url decode bug referred to in the following reports:
> http://code.google.com/p/glassdb/issues/detail?id=283
> http://code.google.com/p/seaside/issues/detail?id=674
> which should be fixed in: ConfigurationOfSwazoo2 2.2.0.4, which I loaded
> with:
> ConfigurationOfSwazoo2 project latestVersion: #development) load
> unfortunately it didn't fix my problem.
> I've checked-in a test to demonstrate the
> issue: Swazoo-2.2.gemstone-NickAger.33
> testDoubleDecode
> | decodedUrl |
> decodedUrl := SwazooURI
> fromString:'http://localhost:8083/pier/about/syntax?_s=vCr1VQ5SzWLx_wOW&_k=YjbgFK5ZQk23dGo7&command=PREditCommand&18&23=Swazoo+had+problems+decoding+this%3A+%2B%2Fabout%2Fsyntax%2FpresaleJpg%7Cstyle%3Ddisplay%3Ablock%2B&_=1313530452863'.
> self assert: (decodedUrl queryAt: '23') = 'Swazoo had problems decoding
> this: +/about/syntax/presaleJpg|style=display:block+'
> which fails....
> I found a fix by removing the HTTPString decodedHTTPFrom: from
> SwazooURI>>#readQueryFrom: however the issue is marked as fixed, so perhaps
> I've missed something...
> I'm also hitting a similar issue with the FastCGI server, but I haven't
> investigated that yet...
> Have I missed something?

The fix in Seaside was to use the already parsed URI using
#identifierPath. However this doesn't alway work as #identifierPath
decodes yet again. From that behavior it is unclear to me whether
SwazooURI is supposed to be decoded or not. This has been reported [1]
but no feedback so far.

 [1] http://sourceforge.net/mailarchive/forum.php?thread_name=CA%2BLFMPhd5VAs7aqN8uAWgheVna_DddijJ0FONQLLjEA555wdFA%40mail.gmail.com&forum_name=swazoo-devel

Cheers
Philippe