From 4d2a45eb25136f57686887a0c27209ffed4e5ad4 Mon Sep 17 00:00:00 2001
From: Alexey Berezhok <alexey.berezhok@softline.com>
Date: Wed, 13 Sep 2023 19:14:41 +0300
Subject: [PATCH] Fixed case when no username request on printing

---
 scheduler/job.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scheduler/job.c b/scheduler/job.c
index 0223bee..65d51d6 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -3658,6 +3658,12 @@ finalize_job(cupsd_job_t *job,		/* I - Job */
 	      ippSetString(job->attrs, &job->reasons, 0,
 			   "cups-held-for-authentication");
           }
+          if (job->printer->num_auth_info_required == 1 && !strcmp(job->printer->auth_info_required[0], "none"))
+            {
+              // Default to "username,password" authentication if none is specified...
+              cupsdSetAuthInfoRequired(job->printer, "username,password", NULL);
+            }
+
           break;
 
       case CUPS_BACKEND_RETRY :
-- 
2.39.1