× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello Dave,

Am 03.03.2021 um 23:07 schrieb Dave <dfx1@xxxxxxxxxxxxxx>:

I'm looking to create some examples of secure vs non-secure code in RPG.

Secure as in "cannot be used as attack vector" isn't dependent on programming language but on one basic thing:

Verify your input!

Google "computer programming best practices" and get some inspiration from whats shown regarding other generic topics.

Passing arbitrary data to data handling routines could be lethal to your data. A classic: https://en.wikipedia.org/wiki/SQL_injection. Division by Zero makes your program crash. https://en.wikipedia.org/wiki/Off-by-one_error can give a multitude of different program behavior.

Depending on the given environment and middleware you're using, you may count on that to prevent invalid input. In the IBM i context, funnily, the probably most hated is also the most secure one: 5250 DDS *DSPF or Panel Groups limit possible characters and maximum lengths. Perhaps it is possible to construct a 5250 response with a specially crafted emulator to overcome such limits. I don't know 5250 at this level. Web input has a lot less limitations and thus opens up much more possibilities.

The difference between security relevant issues and problems "just" leading to erratic program behavior can be a fine line.

Doing proper error handing is not about security, but it provides a better user experience, and can prevent data inconsistencies between multiple data stores. See commitment control for details.

:wq! PoC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.