Bug 76483 - lpoptions does no input validation on option values
Summary: lpoptions does no input validation on option values
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cups
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-22 10:03 UTC by Robert P. J. Day
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-10-22 10:04:05 UTC
Embargoed:


Attachments (Terms of Use)

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).


Note You need to log in before you can comment on or make changes to this bug.