Thanks... we will look into this error and get it fixed.
JFG said:Hello,
I discovered your service today and posted my first request with your good-looking Help.app. In the process I discovered a bug, so here is how to reproduce it.
My question (submitted on the site as #13145) contained the following paragraph:
"Secondly - I tried the "Slideshow" option from the Finder context menu (when you select one or more pictures). All I get is a black screen..."
Help.app displayed the following error:
AppleScript Error
sh: -c: line 14: syntax error near unexpected token '('
etc.
I figured there was a problem with double quotes or parentheses, so I submitted a test question that read:
"Hello"
Now, can the application send the above paragraph without error?
This worked and was submitted as question #13180 (closed within 2 minutes, that's impressive support performance!)
I changed the test phrase by omitting a quote:
"Hello
Now, can the application send the above paragraph without error?
Sure enough, the error came, a slightly different one:
AppleScript Error
curl: no URL specified!
curl: try 'curl --help' for more information
sh: line 2: Now,: command not found
etc.
What if I move the quote and add a parenthesis to the game?
Hello" (
Now, can the application send the above paragraph without error?
At that stage, the error revealed the underlying script syntax (see picture attached), which is a bad idea as it gives crackers an avenue to exploit.
So, before someone crafts a malevolent question, try to escape double-quotes in the question text before passing it to curl. Or better yet: don't use curl through a shell but call it from the handy Objective-C wrapper called CURLHandle, available from http://curlhandle.sourceforge.net/. Use the setPostDictionary method to populate your fields with user-provided text. Unbelievable as this may be, Apple does not provide an easy way to build a POST HTTP request in their WebKit or "URL Loading System" frameworks. If you need something more sophisticated, you can use OmniWeb's excellent OWF framework, available from http://www.omnigroup.com/developer/sourcecode/.
Hope this helps,
JFG