Bug 76483

Summary: lpoptions does no input validation on option values
Product: [Retired] Red Hat Linux Reporter: Robert P. J. Day <rpjday>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-22 10:04:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert P. J. Day 2002-10-22 10:03:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
  the "lpoptions" command does not appear to do any input
validation on option values, allowing the user to set
meaningless option values, such as:

  $ lpoptions -o scaling=fred
  $ lpoptions -o number-up=barney

these values are faithfully stored in the user's
~/.lpoptions file.  while there may be some value in
allowing the definition of completely arbitrary options
and their values, the online docs explicitly talk about
acceptable values for the predefined options, such as 
that "CUPS supports 1, 2, 4, 6, 9, and 16-Up formats;
the default format is 1-Up."

  if there is a restricted set of possible values, then
input validation should be done and error messages should
be generated.



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.lpoptions -o scaling=fred
2.
3.
	

Actual Results:  it took it and did not complain

Expected Results:    input validation should reject an unacceptable value for
a predefined CUPS option

Additional info:

Comment 1 Tim Waugh 2002-10-22 10:07:24 UTC
This is by design (source: cups mailing list).