Bug#1001172: Post processing script execution bug

2022-02-20 Thread Volker C. Behr

On 19.02.22 08:40, Martin-Éric Racine wrote:

On Sun, Dec 5, 2021 at 7:27 PM Alex Liddiard  wrote:

Package: printer-driver-cups-pdf
Version: 3.0.1-9
Severity: normal
X-Debbugs-Cc: alex.liddi...@warwickgrad.net

Dear Maintainer,

I added a script to the PostProcessing option and created a network shared 
cups-pdf printer.
The script executed correctly when printing from a number of different devices 
on my network.
I tried printing from a device which used an unusual username (contained 
brackets and spaces).
The post processing script failed to execute.

Modifying the script and using very simple scripts had no effect.
I enabled full debug logging in cups-pdf and experimented with ipptool.
Could not resolve the issue or find any workarounds.

I discovered the bash command used to execute the script contained errors: 
special characters contained in the username were not escaped.
This was causing the script execution to fail due to a bash syntax error.


I'm not sure I get what or where the bus is. Was your script not
capable of escaping special charachers? Something else?

Martin-Éric


CUPS-PDF itself is not escaping special characters in usernames when 
calling external scripts. This needs to be fixed upstream and is on my list.


Cheers,
Volker



Bug#1001172: Post processing script execution bug

2022-02-18 Thread Martin-Éric Racine
On Sun, Dec 5, 2021 at 7:27 PM Alex Liddiard  wrote:
> Package: printer-driver-cups-pdf
> Version: 3.0.1-9
> Severity: normal
> X-Debbugs-Cc: alex.liddi...@warwickgrad.net
>
> Dear Maintainer,
>
> I added a script to the PostProcessing option and created a network shared 
> cups-pdf printer.
> The script executed correctly when printing from a number of different 
> devices on my network.
> I tried printing from a device which used an unusual username (contained 
> brackets and spaces).
> The post processing script failed to execute.
>
> Modifying the script and using very simple scripts had no effect.
> I enabled full debug logging in cups-pdf and experimented with ipptool.
> Could not resolve the issue or find any workarounds.
>
> I discovered the bash command used to execute the script contained errors: 
> special characters contained in the username were not escaped.
> This was causing the script execution to fail due to a bash syntax error.

I'm not sure I get what or where the bus is. Was your script not
capable of escaping special charachers? Something else?

Martin-Éric



Bug#1001172: Post processing script execution bug

2021-12-05 Thread Alex Liddiard
Package: printer-driver-cups-pdf
Version: 3.0.1-9
Severity: normal
X-Debbugs-Cc: alex.liddi...@warwickgrad.net

Dear Maintainer,

I added a script to the PostProcessing option and created a network shared 
cups-pdf printer.
The script executed correctly when printing from a number of different devices 
on my network.
I tried printing from a device which used an unusual username (contained 
brackets and spaces).
The post processing script failed to execute.

Modifying the script and using very simple scripts had no effect.
I enabled full debug logging in cups-pdf and experimented with ipptool.
Could not resolve the issue or find any workarounds.

I discovered the bash command used to execute the script contained errors: 
special characters contained in the username were not escaped.
This was causing the script execution to fail due to a bash syntax error.

Best regards,
Alex Liddiard

-- System Information:
Distributor ID:    Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:    11
Codename:    bullseye
Architecture: armv7l

Kernel: Linux 5.10.63-v7l+ (SMP w/4 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages printer-driver-cups-pdf depends on:
ii  cups    2.3.3op2-3+deb11u1
ii  cups-client 2.3.3op2-3+deb11u1
ii  ghostscript 9.53.3~dfsg-7+deb11u1
ii  libc6   2.31-13+rpt2+rpi1
ii  libcups2    2.3.3op2-3+deb11u1
ii  libpaper-utils  1.1.28

printer-driver-cups-pdf recommends no packages.

Versions of packages printer-driver-cups-pdf suggests:
pn  system-config-printer