strelitzia:
I see the relevant section of init_sanitize.php handles !empty val_function results with NULL_ACTION, and the others with WORDS_AND_SYMBOLS_REGEX.
Isn't the latter (which is the one used in my circumstances) the one required to handle my data input? If not, how does it differ from NULL_ACTION?
So, in the further development of sanitization, this issue ("over sanitization") was identified as applied to configuration settings in the admin that by base design should not have had specific over sanitization. Further as part of that process, it was determined that in "development" of new configuration options, that it may be possible to apply specific sanitization to the new/alternate configuration option or even to possibly override the pre-determined sanitization.
So, a list of "known" configurations was made that would be simply handled with WORDS_AND_SYMBOLS_REGEX. That list is provided in admin/includes/init_includes/init_sanitize.php
But, if a configuration option has a specific sanitization "process" to be applied, then at the point of processing this file, no action (NULL_ACTION) is taken, with the expectation that the real sanitization will occur at a different point. That alternate point actually occurs in admin/configuration.php when a value is being saved. The presence of a val_function is checked and if it exists, then admin/includes/functions/configuration_checks.php is used to determine if the configuration data is valid. If it is not valid, then the value is not stored and the configuration screen is shown again. If it is valid, then processing continues.
So, yes, while the file mentioned in the response post will take no action if val_function is used, the configuration file will attempt to process the configuration option based on the function file I just mentioned.
How you go forwards from here really is up to you. The recommendation would be to modify the database setting of val_function for your configuration option unless you anticipate and want to update the admin/includes/init_includes/init_sanitize.php every time you upgrade.
One of the benefits of applying a val_function is that it is possible to also provide a message to the admin about any issue associated with the filtering/sanitization of the data. Another though is that the feature will remain a part of the store during each upgrade as the information will remain in the database that is expected to be used/reused in the upgraded store.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...