Skip to content

strip control characters from printer keywords in ipp backend#1632

Closed
aizu-m wants to merge 1 commit into
OpenPrinting:masterfrom
aizu-m:ipp-report-control-chars
Closed

strip control characters from printer keywords in ipp backend#1632
aizu-m wants to merge 1 commit into
OpenPrinting:masterfrom
aizu-m:ipp-report-control-chars

Conversation

@aizu-m

@aizu-m aizu-m commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

a malicious ipp printer that puts a newline in a printer-state-reasons or printer-mandatory-job-attributes keyword injects extra STATE:/PPD: lines into the scheduler, so strip control characters in update_reasons and report_printer_state the same way report_attr already does.

@michaelrsweet michaelrsweet self-assigned this Jun 29, 2026
@michaelrsweet michaelrsweet added the bug Something isn't working label Jun 29, 2026
@michaelrsweet michaelrsweet added this to the v2.4.x milestone Jun 29, 2026
michaelrsweet added a commit that referenced this pull request Jun 29, 2026
michaelrsweet added a commit that referenced this pull request Jun 29, 2026
@michaelrsweet

Copy link
Copy Markdown
Member

Rather than trying to escape keywords and introduce invalid strings, I'm adding calls to ippValidateAttribute so we don't need to worry about it.

[master 2d3fb86] Make sure we don't report invalid printer-state-reasons or printer-mandatory-job-attributes strings (Issue #1632)

[2.4.x a5eea28] Make sure we don't report invalid printer-state-reasons or printer-mandatory-job-attributes strings (Issue #1632)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants