#1095985 dash: Quote removal happening too early

Package:
dash
Source:
dash
Description:
POSIX-compliant shell
Submitter:
Date:
2026-09-23 12:35:04 UTC
Severity:
normal
#1095985#5
Date:
2025-02-14 16:40:32 UTC
From:
To:
Dear Maintainer,

this is basically a copy of https://bugs.debian.org/443685 but for dash
instead of bash.

The discussion at https://austingroupbugs.net/view.php?id=1234 is
helpful.

This behavior of bash is the correct posix behavior:
```
$ bash -o posix -c 'a=\\; echo $a\/*'
/bin /boot /dev /etc /home /initrd.img /initrd.img.old /lib /lib64 /lost+found /media /mnt /opt /proc /root /run /sbin /srv /sys /tmp /usr /var /vmlinuz /vmlinuz.old
```

dash instead behaves this way:
```
$ dash -c 'a=\\; echo $a\/*'
\/*
```

#1095985#10
Date:
2026-06-10 03:00:28 UTC
From:
To:
This is not a bug.  The backslash in $a joins up with the backslash
before the slash, thus forming a double backslash which is taken
as a a literal backslash.

This does not contradcit any existing POSIX standard.

In fact every shell other than bash does the same thing.

Cheers,

#1095985#15
Date:
2026-09-23 12:33:53 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
dash, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1095985@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrej Shadura <andrewsh@debian.org> (supplier of updated dash package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 23 Sep 2026 14:05:05 +0200
Source: dash
Architecture: source
Version: 0.5.13.5-1
Distribution: experimental
Urgency: medium
Maintainer: Andrej Shadura <andrewsh@debian.org>
Changed-By: Andrej Shadura <andrewsh@debian.org>
Closes: 972886 1095985 1106180 1108493 1110364
Changes:
 dash (0.5.13.5-1) experimental; urgency=medium
 .
   [ Andrej Shadura ]
   * New upstream release (Closes: #1106180, #972886).
   * Fix typo in the manpage (Closes: #1108493).
   * Refresh patches and drop patches applied upstream.
 .
   [ Carles Pina i Estany ]
   * Added po-debconf Catalan translation.
 .
   [ Nuri KÜÇÜKLER ]
   * Add Turkish debconf translation (Closes: #1110364)
 .
   [ Luca Boccassi ]
   * Drop versioned dependency on debianutils, satisfied since Bookworm.
 .
   [ Helmut Grohne ]
   * Don't pass host LDFLAGS to CC_FOR_BUILD (Closes: #1095985)
Checksums-Sha1:
 d689aaecde4b70cd90780127b633ab9dbf849c4a 1471 dash_0.5.13.5-1.dsc
 f7bf38cb203bac7b7592fc25a32cd01cf04277a8 261540 dash_0.5.13.5.orig.tar.gz
 3feb50cb340b7d68e1cea968a46d17cd79e10f4f 41060 dash_0.5.13.5-1.debian.tar.xz
Checksums-Sha256:
 acfe536e16b3fbe11d0b1c588cf544894769cebbb9d82efd5542806f9c258f29 1471 dash_0.5.13.5-1.dsc
 40090101a2a491f13e901d3d48e90414f26634628b9bfff35ff540363c227a7d 261540 dash_0.5.13.5.orig.tar.gz
 1c0b30e698418623f520d802e703a35ce633d537d461b174902c16861bc06008 41060 dash_0.5.13.5-1.debian.tar.xz
Files:
 23e158060d694fdc0e77ed0856154829 1471 shells optional dash_0.5.13.5-1.dsc
 d787f34b985fca82e89b131c2e911256 261540 shells optional dash_0.5.13.5.orig.tar.gz
 9744bb5000cd6aa0f1eb6098845ee923 41060 shells optional dash_0.5.13.5-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQSD3NF/RLIsyDZW7aHoRGtKyMdyYQUCarPD4gAKCRDoRGtKyMdy
YZ2gAQCFyoWI4NZPamI3X3Jtuz2ZoRcXQBgwiQRKlOwG04Ds0AD/Sn01E3lonff7
bh48igPwm2lTRuVTb+4UTP1U6rfsTQ4=
=Fd72
-----END PGP SIGNATURE-----