Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When giving a new printer a name of only digits PAPPL always tells that this name already exists #161

Closed
tillkamppeter opened this issue Mar 12, 2021 · 3 comments
Assignees
Labels
bug Something isn't working priority-medium
Milestone

Comments

@tillkamppeter
Copy link
Contributor

If I add a new printer via the "Add Printer" button in the web interface and enter as queue name a string of onluy digits, like 1111, 12345, ... I always get the response that a printer with this name already exists, independent which sequence of digits I choose.

If for some reason such names cause problems, for example for CUPS picking up this printer as temporary queue, or generally for IPP clients, and therefore such a name is not allowed, please let PAPPL respond with a decent error message (like "Printer name has to contain at least one letter" or similar).

@michaelrsweet michaelrsweet self-assigned this Mar 13, 2021
@michaelrsweet michaelrsweet added bug Something isn't working investigating Investigating the issue priority-medium labels Mar 13, 2021
@michaelrsweet michaelrsweet modified the milestones: Stable, v1.1 Mar 13, 2021
@michaelrsweet
Copy link
Owner

The issue is that /ipp/print/NNN gets recognized as a job ID for the default printer. I'll update the code to require a printer name that starts with a non-digit.

@michaelrsweet
Copy link
Owner

OK, so I've updated papplPrinterCreate to sanitize the resource path (not just a straight /ipp/printer/printer-name) so that you can still specify any arbitrary string (still needs to be valid Network Unicode UTF-8 per STD 92).

[master aba1f90] Fix adding of printers whose names contain special characters (Issue #161)

[v1.0.x 75824e9] Fix adding of printers whose names contain special characters (Issue #161)

@michaelrsweet michaelrsweet removed the investigating Investigating the issue label Apr 8, 2021
@michaelrsweet michaelrsweet modified the milestones: v1.1, Stable Apr 8, 2021
@tillkamppeter
Copy link
Contributor Author

It works. I can create a printer names "1111" now and everything works with it. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

No branches or pull requests

2 participants