Michael R Sweet [Tue, 1 Apr 2025 17:45:37 +0000 (13:45 -0400)]
Multiple fixes:
- Fix encryption support (new httpSetEncryption function returns true on success)
- Demote many developer messages to debug2 log level.
- Adopt cupsdLogPrinter in a few places.
- Normalize a few other messages.
Michael R Sweet [Sun, 30 Mar 2025 13:00:34 +0000 (09:00 -0400)]
Update the web interface templates for better usability/discoverability
(Issue #1207)
- Made the navbar larger with more space around the link/title content.
- Now use the OpenPrinting CUPS logo rather than the text in the navbar.
- Added proper section titles and links to common admin functions on the
home page.
- Translations copied from the admin template, may require some tweaking...
zdohnal [Fri, 14 Mar 2025 05:44:45 +0000 (06:44 +0100)]
backend/ipp.c: Avoid NULL strcmp argument
It is possible for format to be NULL (as described in the function signature) which causes a segmentation fault when it is passed to strcmp. This patch changes the conditional to short-circuit if format is NULL and only call strcmp otherwise.
Erik [Thu, 13 Mar 2025 03:44:39 +0000 (23:44 -0400)]
Avoid NULL strcmp argument
It is possible for format to be NULL (as described in the function signature) which causes a segmentation fault when it is passed to strcmp. This patch changes the conditional to short-circuit if format is NULL and only call strcmp otherwise.
zdohnal [Wed, 12 Mar 2025 12:41:44 +0000 (13:41 +0100)]
backend/ipp.c: Raise alert if there is issue with cert
Currently we show more detailed info about this error in debug logs, but since there are not many desktops to pick up our dBUS notification, it would be great to report it in CUPS log too.
Zdenek Dohnal [Wed, 12 Mar 2025 12:19:04 +0000 (13:19 +0100)]
backend/ipp.c: Raise alert if there is issue with cert
Currently we show more detailed info about this error in debug logs, but
since there are not many desktops to pick up our dBUS notification, it
would be great to report it in CUPS log too.
Kirill Furman [Mon, 24 Feb 2025 19:31:45 +0000 (22:31 +0300)]
Fix heap overflow in array.c
When delim variable has \0 value,
strchr() func switch end var to the end of string,
set it to \0 and shift to next byte, which causes
heap overflow when new cycle runs
Fixes #1176
Signed-off by Kirill Furman <kir.furman@gmail.com>
zdohnal [Tue, 7 Jan 2025 17:41:52 +0000 (18:41 +0100)]
search.c: Fix build failure due new GCC
The warning by GCC is false positive because we don't access the freed memory in the scope, only the pointer memory which contained address of allocated memory on the heap, and used that for updating index pointer.
Using ptrdiff_t struct before realloc works the warning around.
Zdenek Dohnal [Tue, 7 Jan 2025 16:44:30 +0000 (17:44 +0100)]
search.c: Fix build failure due new GCC
The warning by GCC is false positive because we don't access the freed
memory in the scope, only the pointer memory which contained address of
allocated memory on the heap, and used that for updating index pointer.
Using ptrdiff_t struct before realloc works the warning around.
zdohnal [Tue, 7 Jan 2025 13:27:02 +0000 (14:27 +0100)]
Add `NoSystem` SSLOptions value
In case using system crypto policy breaks communication with device irreversibly (f.e. if device does not support better key exchange algorithm), the new option value gives a way how to opt-out from crypto policy if user do not want to change default system crypto policy for the whole machine.
Zdenek Dohnal [Mon, 6 Jan 2025 17:34:30 +0000 (18:34 +0100)]
Add `NoSystem` SSLOptions value
In case using system crypto policy breaks communication with device
irreversibly (f.e. if device does not support better key exchange
algorithm), the new option value gives a way how to opt-out from crypto
policy if user do not want to change default system crypto policy for
the whole machine.
Balló György [Sun, 22 Dec 2024 21:50:14 +0000 (22:50 +0100)]
desktop: Add Hungarian translation
Also add to the Settings category, which is the recommended main category for hardware management tools. Reference:
https://specifications.freedesktop.org/menu-spec/latest/additional-category-registry.html
Zdenek Dohnal [Thu, 19 Dec 2024 11:55:53 +0000 (12:55 +0100)]
libcups: Don't overwrite permanent queue with network during discovery
Currently, if there is a permanent queue of the same name as network
discovered printer, the network one is written in `lpstat -l -e` output.
This is confusing to users and maintainers, because if print job is
sent, it comes to the permanent one instead of listed network/temporary,
which can have a different connection or PPD.
This behavior happens when user creates manually a queue with the same
name as the temporary one, or when the permanent queue is created by
cups-browsed. In both cases user realizes he prints into a different
queue once he enables debugging and see printer-uri in logs.
zdohnal [Fri, 6 Dec 2024 06:51:45 +0000 (07:51 +0100)]
tls-gnutls.c: Use system crypto policy if available
Some Linux systems provide a way how to control cryptography on system or service level via cryptographic policies. OpenSSL implementation reflects system changes to some degree, however GnuTLS implementation does not take system policy into account.
GnuTLS supports fallback mechanism, so we can fallback to NORMAL if @System is not defined on the system.
Fortunately, the current GnuTLS implementation allows overrides via priority strings (so no "this cipher/hash is disabled" if we enabled them in our application by priority string), so allowing to honor system policy can save us work if someone wants to disable a specific cipher, so we don't have to implement it in libcups.
Zdenek Dohnal [Wed, 4 Dec 2024 18:20:21 +0000 (19:20 +0100)]
tls-gnutls.c: Use system crypto policy if available
Some Linux systems provide a way how to control cryptography on system
or service level via cryptographic policies. OpenSSL implementation
reflects system changes to some degree, however GnuTLS implementation
does not take system policy into account.
GnuTLS supports fallback mechanism, so we can fallback to NORMAL if
@SYSTEM is not defined on the system.
Fortunately, the current GnuTLS implementation allows overrides via
priority strings (so no "this cipher/hash is disabled" if we enabled
them in our application by priority string), so allowing to honor system
policy can save us work if someone wants to disable a specific cipher,
so we don't have to implement it in libcups.