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

Fix cupsCheckDestSupported() handling of "job-password" option #5557

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Fix cupsCheckDestSupported() handling of "job-password" option
  • Loading branch information
Nikita Podguzov committed Apr 5, 2019
commit 58b7f02049bb02ee7829cd1af028abba994b2639
9 changes: 9 additions & 0 deletions cups/dest-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ cupsCheckDestSupported(
pwg->length >= min_length && pwg->length <= max_length)
return (1);
}
else if (!strcmp(option, "job-password"))
{
/*
* Check that the length of the password doesn't exceed the maximum supported length.
*/

size_t max_length = attr->values[0].integer;
return strlen(value) <= max_length;
}
else
{
/*
Expand Down