Forums
Hi Niels,
A quick question regarding IceBreak.
Is there a fast, clean way to send a file (or its content) from an ftp into a physical file in AS400 using IceBreak?
Another question is if there is any way to escape the data received as parameters into the program?
(Much like preventing SQL injection when doing queries)
Best Regards,
Niklas
Re: IceBreak question
Hi Niklas;
1.) FTP;
I don't know 100% what you are asking here: IceBreak supports HTTP and HTTPS. So you don't need FTP, and IBMi has a nice FTP by its own. However, what you can do is using IceBreak WebDAV, which is a cheap add-on-product that allows you to send and receive files from any HTTP client, very clean and very nice, including versioning and workflow:
http://www.system-method.com/AppStore/FileShare
2.) Escaping data:
Since IceCap is running on top of IceBreak, you can use all features in IceBreak within IceCap. And IceBreak has build-ins escapes encoders and decoders for:
UrlEncode / urlDecoding
base64Encode/ base64decode
xmlEncode / xmlDecode
htmlEncode/htmlDecode
jsonEncode / jsonDecode
csvEncode / csvDecode
But if you are afraid of SQL injections, I will suggest that you use a regex to validate the input i.e. has Scott Klement made some examples around the C-library on the IBMi which you can see here:
http://archive.midrange.com/rpg400-l/200105/msg00106.html
If you have issues with the regex, then I will gladly help you.
Best regards,
Niels LiisbergĀ