~ubuntu-branches/ubuntu/wily/cups-pk-helper/wily

« back to all changes in this revision

Viewing changes to src/cups.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-06-11 12:37:38 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20130611123738-soseggjknay2uy19
Tags: 0.2.5-0ubuntu1
* New upstream version:
  - Revert "Be stricter when validating printer names"
  - New/updated translations
* debian/control: 
  - updated debhelper requirement to match compat, updated standards-version
* debian/patches/git_revert_stricter_validating.patch:
  - dropped, the fix is in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
        int i;
328
328
        int len;
329
329
 
 
330
        /* Quoting the lpadmin man page:
 
331
         *    CUPS allows printer names to contain any printable character
 
332
         *    except SPACE, TAB, "/", or  "#".
 
333
         * On top of that, validate_name() in lpadmin.c (from cups) checks that
 
334
         * the string is 127 characters long, or shorter. */
 
335
 
330
336
        /* no empty string */
331
337
        if (!name || name[0] == '\0')
332
338
                return FALSE;
334
340
        len = strlen (name);
335
341
        /* no string that is too long; see comment at the beginning of the
336
342
         * validation code block */
337
 
        if (len > CPH_STR_MAXLEN)
 
343
        if (len > 127)
338
344
                return FALSE;
339
345
 
340
346
        /* only printable characters, no space, no /, no # */