Bug 703238 - Add validation of command line options
Summary: Add validation of command line options
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: master
Hardware: All All
: P4 enhancement
Assignee: Ray Johnston
URL:
Keywords:
: 703242 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-07 22:12 UTC by Peter Cherepanov
Modified: 2021-10-12 17:51 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Cherepanov 2020-12-07 22:12:37 UTC
The two-level nature of command line argument processing makes full validation of command line arguments quite difficult to implement. However a partial solution is better than nothing.

Let's add a new options, for instance, -D that checks whether the name is present in a whitelist and rejects the rest.
Comment 1 Ray Johnston 2020-12-08 16:25:28 UTC
-D is already used -- it is a synonym for -d

This kind of thing might be part of our documentation improvement effort.

The importance of command line argument validation is sort of waning as the
use of Ghostscript (and GhostPDL) shifts to the newer API functions such as
gsapi_set_param using the JavaScript, Java, python, or C# bindings.
Comment 2 Peter Cherepanov 2020-12-09 19:08:10 UTC
*** Bug 703242 has been marked as a duplicate of this bug. ***