]> git.ipfire.org Git - thirdparty/cups.git/log
thirdparty/cups.git
16 months agoMerge branch 'master' into ABI 674/head
Michael R Sweet [Tue, 2 Apr 2024 22:44:53 +0000 (18:44 -0400)] 
Merge branch 'master' into ABI

16 months agoFix 'deny everyone' example (Issue #844)
Michael R Sweet [Tue, 2 Apr 2024 21:47:49 +0000 (17:47 -0400)] 
Fix 'deny everyone' example (Issue #844)

16 months agoFix httpGets timeout handling (Issue #879)
Michael R Sweet [Tue, 2 Apr 2024 15:19:41 +0000 (11:19 -0400)] 
Fix httpGets timeout handling (Issue #879)

16 months agoDrop 'none' test (Issue #909)
Michael R Sweet [Tue, 2 Apr 2024 14:51:19 +0000 (10:51 -0400)] 
Drop 'none' test (Issue #909)

16 months agocups/request.c: Show filename in message in `cupsDoFileRequest()`
zdohnal [Tue, 2 Apr 2024 13:52:25 +0000 (15:52 +0200)] 
cups/request.c: Show filename in message in `cupsDoFileRequest()`

Show which file we tried to access in the error message, if we have issues accessing it.

Related #904

16 months agoFix the initialization and validation of checkbox and text fields in CGI forms.
Michael R Sweet [Tue, 2 Apr 2024 12:36:06 +0000 (08:36 -0400)] 
Fix the initialization and validation of checkbox and text fields in CGI forms.

16 months agoUpdate CUPS-Create-Local-Printer to preserve the existing printer based on the
Michael R Sweet [Wed, 27 Mar 2024 18:38:46 +0000 (14:38 -0400)] 
Update CUPS-Create-Local-Printer to preserve the existing printer based on the
device URI (Issue #871)

Also keep the temporary printer for up to 5 minutes without activity, and update
the state change time every time CUPS-Create-Local-Printer is called.

16 months agoFix client logging of requests.
Michael R Sweet [Wed, 27 Mar 2024 18:38:28 +0000 (14:38 -0400)] 
Fix client logging of requests.

16 months agoDon't use sanitizer on macOS due to performance issues on Github Actions servers.
Michael R Sweet [Wed, 27 Mar 2024 18:32:00 +0000 (14:32 -0400)] 
Don't use sanitizer on macOS due to performance issues on Github Actions servers.

16 months agoUpdate Windows DLL exports.
Michael R Sweet [Wed, 27 Mar 2024 17:02:55 +0000 (13:02 -0400)] 
Update Windows DLL exports.

16 months agoUpdate cupsd code to report all supported raster resolutions (Issue #901)
Michael R Sweet [Wed, 27 Mar 2024 16:42:53 +0000 (12:42 -0400)] 
Update cupsd code to report all supported raster resolutions (Issue #901)

16 months agoDrop old strlcat/cpy emulation functions.
Michael R Sweet [Wed, 27 Mar 2024 16:42:49 +0000 (12:42 -0400)] 
Drop old strlcat/cpy emulation functions.

16 months agoStop doing EUC-JP test.
Michael R Sweet [Wed, 27 Mar 2024 16:42:20 +0000 (12:42 -0400)] 
Stop doing EUC-JP test.

16 months agoFix encoding of extension values (Issue #913)
Michael R Sweet [Mon, 25 Mar 2024 22:33:34 +0000 (18:33 -0400)] 
Fix encoding of extension values (Issue #913)

16 months agoUpdate changelog and make sure we have the len==0 check for cupsRasterReadPixels...
Michael R Sweet [Mon, 25 Mar 2024 19:07:53 +0000 (15:07 -0400)] 
Update changelog and make sure we have the len==0 check for cupsRasterReadPixels as well.

16 months agoMerge pull request #914 from yetamrra/raster-write-check
Michael R Sweet [Mon, 25 Mar 2024 19:01:54 +0000 (15:01 -0400)] 
Merge pull request #914 from yetamrra/raster-write-check

Add additional parameter validation to _cupsRasterWritePixels

16 months agoAdd additional parameter validation to _cupsRasterWritePixels 914/head
Benjamin Gordon [Mon, 25 Mar 2024 15:59:21 +0000 (09:59 -0600)] 
Add additional parameter validation to _cupsRasterWritePixels

If len is 0, the function does a lot of calculations that ultimately
don't produce any output.  This can be skipped with an early return.

If cupsBytesPerLine is 0, this triggers a divide by zero if the output
isn't compressed.  This is an error on the caller's part, but it's
nicer to return an error than to crash.

16 months agocups/request.c: Show filename in message in `cupsDoFileRequest()` 912/head
Zdenek Dohnal [Fri, 22 Mar 2024 08:05:45 +0000 (09:05 +0100)] 
cups/request.c: Show filename in message in `cupsDoFileRequest()`

Show which file we tried to access in the error message, if we have
issues with accessing it.

Related #904

16 months agocups/ipp.c: Use strcmp, since attribute names are case sensitive
Zdenek Dohnal [Fri, 22 Mar 2024 05:26:40 +0000 (06:26 +0100)] 
cups/ipp.c: Use strcmp, since attribute names are case sensitive

16 months agosnmp.c: Validate input OID string for `_cupsSNMPStringToOID()`
zdohnal [Tue, 19 Mar 2024 09:41:19 +0000 (10:41 +0100)] 
snmp.c: Validate input OID string for `_cupsSNMPStringToOID()`

We can accept OID string as input in few cases (mainly via side channel) and if the crafted OID string is sent, internal function asn1_size_oid() can end up with stack buffer overflow.

The issue happens when one OID node is too large, or OID is invalid (ending with dots) - we can fix it in _cupsSNMPStringToOID() by checking if the last source character is a dot (invalid OID), and by limiting integer for OID node to 0xffff.

Fixes #905

16 months agosnmp.c: Validate input OID string for `_cupsSNMPStringToOID()` 907/head
Zdenek Dohnal [Mon, 18 Mar 2024 14:02:30 +0000 (15:02 +0100)] 
snmp.c: Validate input OID string for `_cupsSNMPStringToOID()`

We can accept OID string as input in few cases (mainly via side channel)
and if the crafted OID string is sent, internal function
`asn1_size_oid()` can end up with stack buffer overflow.

The issue happens when one OID node is too large, or OID is invalid
(ending with dots) - we can fix it in `_cupsSNMPStringToOID()` by
checking if the last source character is a dot (invalid OID),
and by limiting integer for OID node to 0xffff.

Fixes #905

16 months agoFix get-printer-attributes test with media-col-database
zdohnal [Mon, 11 Mar 2024 11:00:47 +0000 (12:00 +0100)] 
Fix get-printer-attributes test with media-col-database

The test that is supposed to explicitly ask for requested-attributes='media-col-database' is instead asking for requested-attributes='all'

16 months agoFix get-printer-attributes test with media-col-database 908/head
Alexander Rogovskyy [Fri, 8 Mar 2024 00:11:29 +0000 (01:11 +0100)] 
Fix get-printer-attributes test with media-col-database

17 months agoFix IPv6 address encoding in the Host: header (Issue #903)
Michael R Sweet [Fri, 1 Mar 2024 16:52:38 +0000 (11:52 -0500)] 
Fix IPv6 address encoding in the Host: header (Issue #903)

17 months agoUpdate cupsCreateRequestedArray for Get-Output-Device-Attributes. 897/head
Michael R Sweet [Fri, 16 Feb 2024 18:01:28 +0000 (13:01 -0500)] 
Update cupsCreateRequestedArray for Get-Output-Device-Attributes.

17 months agoUpdate CHANGES.md
Zdenek Dohnal [Thu, 15 Feb 2024 17:12:01 +0000 (18:12 +0100)] 
Update CHANGES.md

17 months agoppd-cache.c: Check for required attributes if URF or PWG Raster are found
zdohnal [Thu, 15 Feb 2024 12:45:34 +0000 (13:45 +0100)] 
ppd-cache.c: Check for required attributes if URF or PWG Raster are found

Some devices have image/urf in document-format-supported, but is missing urf-supported if AirPrint support is turned off, which breaks PPD generation.

Check for attribute urf-supported when we are about to decide whether the printer uses AirPrint, so in case the device supports another driverless standard, we can use it for PPD generation.

Apply the same for PWG Raster too.

Fixes Fedora issue #2263053

17 months agoMention reporting issues earlier
Zdenek Dohnal [Thu, 15 Feb 2024 06:50:34 +0000 (07:50 +0100)] 
Mention reporting issues earlier

17 months agoFix typo in workaround.
Michael R Sweet [Wed, 14 Feb 2024 15:26:07 +0000 (10:26 -0500)] 
Fix typo in workaround.

17 months agoAdd proposed workaround for Github Actions CI test on macOS.
Michael R Sweet [Wed, 14 Feb 2024 15:19:39 +0000 (10:19 -0500)] 
Add proposed workaround for Github Actions CI test on macOS.

17 months agoppd-cache.c: Check for PWG attribute as well 890/head
Zdenek Dohnal [Wed, 14 Feb 2024 14:38:01 +0000 (15:38 +0100)] 
ppd-cache.c: Check for PWG attribute as well

If the device reports image/pwg-raster and we are about to use it, check
for pwg-raster-document-resolution-supported too.

17 months agoppd-cache.c: Check for `urf-supported` if `image/urf` is found
Zdenek Dohnal [Tue, 13 Feb 2024 07:20:52 +0000 (08:20 +0100)] 
ppd-cache.c: Check for `urf-supported` if `image/urf` is found

Some devices have `image/urf` in `document-format-supported`, but is
missing `urf-supported` if AirPrint support is turned off, which breaks
PPD generation.

Check for attribute `urf-supported` when we are about to decide whether
the printer uses AirPrint, so in case the device supports another
driverless standard, we can use it for PPD generation.

Fixes [Fedora issue](https://bugzilla.redhat.com/show_bug.cgi?id=2263053)

17 months agoUpdate CHANGES.md
Zdenek Dohnal [Wed, 14 Feb 2024 13:10:39 +0000 (14:10 +0100)] 
Update CHANGES.md

17 months agoUse PAM password-auth or system-auth if present
zdohnal [Wed, 14 Feb 2024 13:08:06 +0000 (14:08 +0100)] 
Use PAM password-auth or system-auth if present

Enables possibility to use PAM modules password-auth or system-auth if they exist during compilation. password-auth module is for remote authentication and system-auth for local authentication.

17 months agoUse PAM password-auth or system-auth if present 892/head
Zdenek Dohnal [Wed, 14 Feb 2024 08:35:05 +0000 (09:35 +0100)] 
Use PAM password-auth or system-auth if present

This PR is actually based on one really old patch we have in Fedora,
which enables possibility to use PAM modules password-auth or
system-auth if they exist during compilation.

Those PAM modules looks to be used for remote, respective local
authentication, in Linux. Would it be possible to add their support into
CUPS?

17 months agoPause running unit tests on macOS until we figure out what is wrong with the Github...
Michael R Sweet [Mon, 12 Feb 2024 00:50:29 +0000 (19:50 -0500)] 
Pause running unit tests on macOS until we figure out what is wrong with the Github builder...

17 months agoUpdate Windows DLL exports.
Michael R Sweet [Mon, 12 Feb 2024 00:31:10 +0000 (19:31 -0500)] 
Update Windows DLL exports.

17 months agoReturn HTTP status 404 for non-existing classes and printers (Issue #423)
Michael R Sweet [Sun, 11 Feb 2024 14:21:43 +0000 (09:21 -0500)] 
Return HTTP status 404 for non-existing classes and printers (Issue #423)

17 months agoMerge pull request #887 from alexpevzner/cups-pzz-master-fix-warnings
Alexander Pevzner [Fri, 9 Feb 2024 04:31:28 +0000 (07:31 +0300)] 
Merge pull request #887 from alexpevzner/cups-pzz-master-fix-warnings

Fixed a couple of gcc warnings

17 months agoFixed gcc warning 887/head
Alexander Pevzner [Thu, 8 Feb 2024 08:49:02 +0000 (11:49 +0300)] 
Fixed gcc warning

In cups/dest.c:

    dest.c:1830:21: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
     1733 |       DEBUG_printf(("1cupsGetNamedDest: Using name=\"%s\"...", name));
  |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is really true, and gcc was smart enough to deduct it from context.
Obviously, we meant to print dest_name here.

17 months agoUpdate CHANGELOG.md
Zdenek Dohnal [Thu, 8 Feb 2024 08:58:51 +0000 (09:58 +0100)] 
Update CHANGELOG.md

17 months agoAdd unidir USB quirk for Oki 407
zdohnal [Thu, 8 Feb 2024 08:55:22 +0000 (09:55 +0100)] 
Add unidir USB quirk for Oki 407

Fixes #877

17 months agoAdd unidir USB quirk for Oki 407 886/head
Zdenek Dohnal [Tue, 6 Feb 2024 13:58:11 +0000 (14:58 +0100)] 
Add unidir USB quirk for Oki 407

Fixes #877

18 months agoMerge pull request #881 from OpenPrinting/dependabot/github_actions/microsoft/setup...
Michael R Sweet [Thu, 1 Feb 2024 15:05:42 +0000 (10:05 -0500)] 
Merge pull request #881 from OpenPrinting/dependabot/github_actions/microsoft/setup-msbuild-2.0.0

build(deps): bump microsoft/setup-msbuild from 1.3.1 to 2.0.0

18 months agobuild(deps): bump microsoft/setup-msbuild from 1.3.1 to 2.0.0 881/head
dependabot[bot] [Thu, 1 Feb 2024 10:41:09 +0000 (10:41 +0000)] 
build(deps): bump microsoft/setup-msbuild from 1.3.1 to 2.0.0

Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 1.3.1 to 2.0.0.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v1.3.1...v2.0.0)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agoMirror fix from libcups.
Michael R Sweet [Wed, 31 Jan 2024 15:27:00 +0000 (10:27 -0500)] 
Mirror fix from libcups.

18 months agoRemove excess debugging (Issue #875)
Michael R Sweet [Thu, 25 Jan 2024 02:29:02 +0000 (21:29 -0500)] 
Remove excess debugging (Issue #875)

18 months agoCopy string copy/concat/format changes from libcups v3.
Michael R Sweet [Thu, 25 Jan 2024 02:22:55 +0000 (21:22 -0500)] 
Copy string copy/concat/format changes from libcups v3.

Remove all unnecessary string function checks.

Remove old snprintf emulation functions (now require C99 which always has it)

18 months agobackend/ipp.c: Fix printing jobs with long names on older IPP printers
zdohnal [Tue, 16 Jan 2024 12:27:10 +0000 (13:27 +0100)] 
backend/ipp.c: Fix printing jobs with long names on older IPP printers

On older printers (ones which don't support IPP operation Create-Job) we concatenate job number and title into one string, which we use as IPP attribute job-name. If the original title was almost 255 chars, the joining the strings will overflow maximal required length for this attribute, and Validate-Job fails.

We could check whether the string is longer than 255 and cut it, but I chose to shrink the buffer to 256, since we already use snprintf() which will cut the string and put null terminator for us.

Fixes #644

18 months agobackend/ipp.c: Fix printing jobs with long names on older IPP printers 866/head
Zdenek Dohnal [Tue, 16 Jan 2024 07:31:15 +0000 (08:31 +0100)] 
backend/ipp.c: Fix printing jobs with long names on older IPP printers

On older printers (ones which don't support IPP operation Create-Job)
we concatenate job number and title into one string, which we use as
IPP attribute job-name. If the original title was almost 255 chars,
the joining the strings will overflow maximal required length
for this attribute, and Validate-Job fails.

We could check whether the string is longer than 255 and cut it,
but I chose to shrink the buffer to 256, since we already use snprintf()
which will cut the string and put null terminator for us.

Fixes #644

18 months agobackend/ipp.c: Fix infinite loop with Kerberos
zdohnal [Mon, 15 Jan 2024 15:00:56 +0000 (16:00 +0100)] 
backend/ipp.c: Fix infinite loop with Kerberos

If IP address was used with Kerberos, IPP backend retried connection indefinitely. The fix is to abort when we find out hostname is an IP address and we require Kerberos.

Fixes #838

18 months agobackend/ipp.c: Fix infinite loop with Kerberos 864/head
Zdenek Dohnal [Mon, 15 Jan 2024 14:14:24 +0000 (15:14 +0100)] 
backend/ipp.c: Fix infinite loop with Kerberos

If IP address was used with Kerberos, IPP backend retried connection
indefinitely. The fix is to abort when we find out hostname is an IP
address and we require Kerberos.

Fixes #838

18 months agoUpdate CHANGES.md
Zdenek Dohnal [Mon, 15 Jan 2024 13:08:54 +0000 (14:08 +0100)] 
Update CHANGES.md

18 months agoMerge pull request #860 from ValdikSS/master
Michael R Sweet [Fri, 12 Jan 2024 21:49:40 +0000 (16:49 -0500)] 
Merge pull request #860 from ValdikSS/master

Report proper media-source-supported IPP field on numeric InputSlots

18 months agoFix whitespace error
Zdenek Dohnal [Fri, 12 Jan 2024 09:47:40 +0000 (10:47 +0100)] 
Fix whitespace error

18 months agoAdd/update copyrights
Zdenek Dohnal [Fri, 12 Jan 2024 08:02:01 +0000 (09:02 +0100)] 
Add/update copyrights

18 months agoFix print-scaling option support for IPP printers (Issue #862)
Michael R Sweet [Wed, 10 Jan 2024 20:42:16 +0000 (15:42 -0500)] 
Fix print-scaling option support for IPP printers (Issue #862)

18 months agoReport proper media-source-supported IPP field on numeric InputSlots. #859 860/head
ValdikSS [Tue, 9 Jan 2024 01:21:52 +0000 (04:21 +0300)] 
Report proper media-source-supported IPP field on numeric InputSlots. #859

Windows 11 version 22H2 build 22621.2861 silently fails to add Mopria
auto-discovered printer if it reports a number (a digit as a string)
in media-source-supported field.
If you try to add such a printer using modern control panel, it will
show endless "connecting…" message, and if you add it using old
control panel, it would be added "successfully", but under
"unrecognized" device type, and you won't be able to print on it.

Fix the issue by
    * By comparing also by human-readable InputSlot name
    * By mapping number to "tray-N" string

19 months agoFix CI for CUPS 2.5
zdohnal [Fri, 5 Jan 2024 06:21:13 +0000 (07:21 +0100)] 
Fix CI for CUPS 2.5

Fixing deadlock and infinite loop in `cups_enum_dests()` - more info in specific commits.

19 months agodnssd.c: Fix deadlock in `cups_enum_dests()` 857/head
Zdenek Dohnal [Thu, 4 Jan 2024 12:58:42 +0000 (13:58 +0100)] 
dnssd.c: Fix deadlock in `cups_enum_dests()`

Deadlock happens when we are about to destroy DNSSD struct by the end
of `cups_enum_dests()`. The main thread locks the mutex when the other
thread is in avahi poll callback at function `poll()` and unlocked the
mutex before - the other thread tries to lock the mutex once poll
timeout expires, but it cannot because it was locked by the main thread
and wait there. Meanwhile the main thread tries to cancel the other
thread, but the function where the other thread is not a cancellation
point, thus the cancel event is ignored and the main thread thread waits
indefinitely for the end of the other thread.

We can make the other thread asynchronous (which would cancel the thread
immediately) or release the mutex earlier in `cupsDNSSDDelete()`. The
commit does the latter.

Fixes CI for Linux

19 months agodest.c: Fix infinite loop in `cups_enum_dests()`
Zdenek Dohnal [Thu, 4 Jan 2024 12:33:04 +0000 (13:33 +0100)] 
dest.c: Fix infinite loop in `cups_enum_dests()`

Update remaining time after `usleep()`, otherwise there is no difference
in elapsed time, so `remaining` will never be less or equal to 0.

Fixes CI on Linux

19 months agoppd-emit.c: Update code style after new PR
Zdenek Dohnal [Thu, 4 Jan 2024 11:56:47 +0000 (12:56 +0100)] 
ppd-emit.c: Update code style after new PR

19 months agoUpdate CHANGES.md
Zdenek Dohnal [Thu, 4 Jan 2024 11:50:48 +0000 (12:50 +0100)] 
Update CHANGES.md

19 months agoppd-emit.c: Fix SEGV in 'ppdEmitString()'
zdohnal [Thu, 4 Jan 2024 09:53:05 +0000 (10:53 +0100)] 
ppd-emit.c: Fix SEGV in 'ppdEmitString()'

When using testppd.c as a harness, a fuzzer found a way to call ppdPageSize() with NULL return value.
This caused a segmentation fault because the size structure, which is used by values[pos], was assigned a NULL value.
To avoid this, we need to add a NULL value check for the size structure, free allocated memory, and return NULL.

Fixes #849

19 months agoupdate code style #850 850/head
Кирилл Фурман [Wed, 3 Jan 2024 06:53:54 +0000 (09:53 +0300)] 
update code style #850

19 months agoMerge branch 'OpenPrinting:master' into master
Kirill [Wed, 3 Jan 2024 06:43:39 +0000 (09:43 +0300)] 
Merge branch 'OpenPrinting:master' into master

19 months agoMerge pull request #854 from OpenPrinting/dependabot/github_actions/github/codeql...
Michael R Sweet [Mon, 1 Jan 2024 13:00:40 +0000 (08:00 -0500)] 
Merge pull request #854 from OpenPrinting/dependabot/github_actions/github/codeql-action-3

Bump github/codeql-action from 2 to 3

19 months agoBump github/codeql-action from 2 to 3 854/head
dependabot[bot] [Mon, 1 Jan 2024 10:45:37 +0000 (10:45 +0000)] 
Bump github/codeql-action from 2 to 3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
19 months agoUpdate CUPS programming manual for some of the new APIs and recommendations.
Michael R Sweet [Sun, 31 Dec 2023 14:49:03 +0000 (09:49 -0500)] 
Update CUPS programming manual for some of the new APIs and recommendations.

19 months agoFinal cleanup for 'make unittests' to be separate from 'make test' (Issue #612)
Michael R Sweet [Fri, 29 Dec 2023 14:16:00 +0000 (09:16 -0500)] 
Final cleanup for 'make unittests' to be separate from 'make test' (Issue #612)

19 months agoAdd media-source to media-col-ready for iOS 17+ (Issue #738)
Michael R Sweet [Fri, 29 Dec 2023 14:02:57 +0000 (09:02 -0500)] 
Add media-source to media-col-ready for iOS 17+ (Issue #738)

19 months agoClean up.
Michael R Sweet [Wed, 27 Dec 2023 21:47:16 +0000 (16:47 -0500)] 
Clean up.

19 months agoUpdate mailing list info.
Michael R Sweet [Wed, 27 Dec 2023 16:17:02 +0000 (11:17 -0500)] 
Update mailing list info.

19 months agoppd-emit.c: Fix SEGV in 'ppdEmitString()'
Kirill Furman [Wed, 27 Dec 2023 13:34:24 +0000 (16:34 +0300)] 
ppd-emit.c: Fix SEGV in 'ppdEmitString()'
When using testppd.c as a harness, a fuzzer found a way to call
ppdPageSize() with NULL return value. This caused a segmentation fault
because the size structure, which is used by values[pos],
was assigned a NULL value. To avoid this, we need to add a
NULL value check for the size structure, free allocated memory,
and return NULL.

Fixes #849

19 months agoChangelog.
Michael R Sweet [Wed, 27 Dec 2023 03:13:57 +0000 (22:13 -0500)] 
Changelog.

19 months agoUpdate documentation.
Michael R Sweet [Thu, 5 Oct 2023 15:55:02 +0000 (11:55 -0400)] 
Update documentation.

19 months agoMerge pull request #848 from ValdikSS/add-model-filter
Michael R Sweet [Tue, 26 Dec 2023 18:58:30 +0000 (13:58 -0500)] 
Merge pull request #848 from ValdikSS/add-model-filter

Web Ui: add filter by printer model in PPD driver list

19 months agoWeb Ui: add filter by printer model in PPD driver list 848/head
ValdikSS [Tue, 26 Dec 2023 01:52:53 +0000 (04:52 +0300)] 
Web Ui: add filter by printer model in PPD driver list

Implement JavaScript filter for the PPD list in "Add Printer"
and "Modify Printer" dialogs.

Sometimes there are too many models in the list that it's hard to find
the one you want.

19 months agoMerge pull request #846 from ValdikSS/tag-fix
Michael R Sweet [Tue, 26 Dec 2023 16:06:00 +0000 (11:06 -0500)] 
Merge pull request #846 from ValdikSS/tag-fix

Close OPTION HTML tag in printer driver list template

19 months agoMerge pull request #847 from ValdikSS/ru-fix
Michael R Sweet [Tue, 26 Dec 2023 15:56:05 +0000 (10:56 -0500)] 
Merge pull request #847 from ValdikSS/ru-fix

Web Ui: Fix Russian translation in choose-model template

19 months agoWeb Ui: Fix Russian translation in choose-model template 847/head
ValdikSS [Tue, 26 Dec 2023 02:00:54 +0000 (05:00 +0300)] 
Web Ui: Fix Russian translation in choose-model template

19 months agoClose OPTION HTML tag in printer driver list template 846/head
ValdikSS [Tue, 26 Dec 2023 00:43:34 +0000 (03:43 +0300)] 
Close OPTION HTML tag in printer driver list template

The tag was never closed which produced invalid HTML.
Luckily, this apparently has worked in all browsers.

19 months agoUpdate CHANGES.md
Zdenek Dohnal [Fri, 15 Dec 2023 10:02:31 +0000 (11:02 +0100)] 
Update CHANGES.md

19 months agohttpAddrConnect2: Check for error if POLLHUP is in valid revents
zdohnal [Thu, 14 Dec 2023 16:33:40 +0000 (17:33 +0100)] 
httpAddrConnect2: Check for error if POLLHUP is in valid revents

Some Linux kernel versions put POLLOUT|POLLHUP into revents when client tries to connect with httpAddrConnect2(), which makes the connection fail.
Let's check the option SO_ERROR before scratching the attempt - if there is no error, remove POLLHUP from revents.

I've re-purposed previously Solaris-only code to be used everywhere if the conditions are met - this should prevent bigger delays than necessary.

Slightly different issue than #827, but with similar symptoms (kernel sending POLLOUT|POLLHUP).

19 months agohttpAddrConnect2: Check for error if POLLHUP is in valid revents 839/head
Zdenek Dohnal [Thu, 14 Dec 2023 08:37:22 +0000 (09:37 +0100)] 
httpAddrConnect2: Check for error if POLLHUP is in valid revents

Some Linux kernel versions put POLLOUT|POLLHUP into revents when client tries to connect with httpAddrConnect2(), which makes the connection fail.
Let's check the option SO_ERROR before scratching the attempt - if there is no error, remove POLLHUP from revents.

I've re-purposed previously Solaris-only code to be used everywhere if the conditions are met - this should prevent bigger delays than necessary.

Slightly different issue than #827, but with similar symptoms (kernel sending POLLOUT|POLLHUP).

20 months agoscheduler: Fix build failure on Linux with '-Werror -Wall'
zdohnal [Wed, 29 Nov 2023 14:07:18 +0000 (15:07 +0100)] 
scheduler: Fix build failure on Linux with '-Werror -Wall'

The string which we add into array stays const after fixing #814 (because strdup(), which caused memory leak returned char *) and compiler fails because of it if it runs with '-Werror -Wall'.

20 months agoUpdate CHANGES.md
Zdenek Dohnal [Mon, 27 Nov 2023 11:52:01 +0000 (12:52 +0100)] 
Update CHANGES.md

20 months agoscheduler: Set reasons in cupsdSetJobState only if we call finalize_job later
zdohnal [Mon, 27 Nov 2023 09:37:18 +0000 (10:37 +0100)] 
scheduler: Set reasons in cupsdSetJobState only if we call finalize_job later

Before the fix, every successfully printed jobs ended up with 'processing-to-stop-point' as the last reasons message.

Together with #830 fixes #828 .

20 months agoUpdate CHANGES.md
Zdenek Dohnal [Mon, 27 Nov 2023 09:13:39 +0000 (10:13 +0100)] 
Update CHANGES.md

20 months agoraster-interpreter.c: Fix crash in 'scan_ps()' found by fuzzer
zdohnal [Mon, 27 Nov 2023 09:11:52 +0000 (10:11 +0100)] 
raster-interpreter.c: Fix crash in 'scan_ps()' found by fuzzer

Fuzzer using _cupsRasterExecPS() found a way how to pass NULL into scan_ps(), causing crash - we have to sanitize the argument for NULL to fix it.

Fixes #831

20 months agoscheduler: Fix build failure on Linux with '-Werror -Wall' 835/head
Zdenek Dohnal [Mon, 27 Nov 2023 09:05:55 +0000 (10:05 +0100)] 
scheduler: Fix build failure on Linux with '-Werror -Wall'

The string which we add into array stays `const` after fixing #814
(because `strdup()`, which caused memory leak returned `char *`)
and compiler fails because of it if it runs with '-Werror -Wall'.

20 months agoraster-interpreter.c: Fix crash in 'scan_ps()' found by fuzzer 834/head
Zdenek Dohnal [Fri, 24 Nov 2023 10:46:53 +0000 (11:46 +0100)] 
raster-interpreter.c: Fix crash in 'scan_ps()' found by fuzzer

Fuzzer using `_cupsRasterExecPS()` found a way how to pass NULL into
`scan_ps()`, causing crash - we have to sanitize the argument for NULL
to fix it.

Fixes #831

20 months agoUpdate CHANGES.md
Zdenek Dohnal [Fri, 24 Nov 2023 06:32:28 +0000 (07:32 +0100)] 
Update CHANGES.md

20 months agolpstat.c: Implement successful filter for jobs
zdohnal [Fri, 24 Nov 2023 06:26:31 +0000 (07:26 +0100)] 
lpstat.c: Implement successful filter for jobs

Introduce a new argument value 'successful' in lpstat to get jobs which completed successfully without introducing a new IPP value for IPP attribute 'which-jobs'

Together with #832 fixes #828 .

20 months agoscheduler: Set reasons in 'cupsdSetJobState' only if we call finalize_job() later 832/head
Zdenek Dohnal [Fri, 24 Nov 2023 06:19:20 +0000 (07:19 +0100)] 
scheduler: Set reasons in 'cupsdSetJobState' only if we call finalize_job() later

20 months agoscheduler/colorman.c: Fix memory leak during creating color profile
zdohnal [Fri, 24 Nov 2023 05:08:51 +0000 (06:08 +0100)] 
scheduler/colorman.c: Fix memory leak during creating color profile

Since the array profiles is set to use strdup() as a copy function, we don't have to use strdup() on the element which is passed as parameter of cupsArrayAdd() - using the strdup() as we used till now causes memory leak.

Reproducer is the same as #813 .

20 months agoscheduler: Report warning if destination doesn't follow IPP spec
zdohnal [Thu, 23 Nov 2023 15:42:09 +0000 (16:42 +0100)] 
scheduler: Report warning if destination doesn't follow IPP spec

Report warning if the destination can't answer to IPP request containing 'all,media-col-database' combination in one response, which is against RFC. This way we can find out about more devices which have those firmware issues.

20 months agoscheduler: Set reasons in cupsdSetJobState only if we call finalize_job later
Zdenek Dohnal [Thu, 23 Nov 2023 15:07:46 +0000 (16:07 +0100)] 
scheduler: Set reasons in cupsdSetJobState only if we call finalize_job later

20 months agoCheck for value, not name 830/head
Zdenek Dohnal [Thu, 23 Nov 2023 14:42:12 +0000 (15:42 +0100)] 
Check for value, not name

20 months agolpstat.c: Implement successful filter for jobs
Zdenek Dohnal [Thu, 23 Nov 2023 12:02:54 +0000 (13:02 +0100)] 
lpstat.c: Implement successful filter for jobs