Package: plocate
Version: 1.1.18-1
Severity: normal

> touch test\ locate.txt
> touch test\ locate[.txt
> sudo systemctl start plocate-updatedb.service
> # verify locate database up-to-date:
> locate 'test locate'
/home/myself/test locate.txt
/home/myself/test locate[.txt
> #Uh oh:
> locate 'test locate['
Pattern 'test locate[' ended prematurely

Ok, so it's interpreting [...] as a character class despite me not saying 
"--regex" nor "--rexexp"?

Nope:

> locate 'tes[st] locate'
> locate --regex 'tes[st] locate'
/home/myself/test locate.txt
/home/myself/test locate[.txt
> locate --regexp 'tes[st] locate'
/home/myself/test locate.txt
/home/myself/test locate[.txt
> locate 'test locate['
Pattern 'test locate[' ended prematurely
> locate 'test locate[[]'
> locate 'test locate[\[]'
> locate 'test locate.'
/home/myself/test locate.txt
> locate --regex 'test locate.'
/home/myself/test locate.txt
/home/myself/test locate[.txt
> locate --regexp 'test locate.'
/home/myself/test locate.txt
/home/myself/test locate[.txt

Looks like it sees something that looks like a character class even
when not told it's looking for regexps, starts treating it as a
character class, which fails, because the user hasn't supplied a
character class, but even when the user supplies a valid character
class that should match, doesn't.

I can't report this issue upstream because the git repo is on ipv6
only.



-- System Information:
Debian Release: 12.11
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable'), (5, 'testing'), (2, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.11.5+bpo-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages plocate depends on:
ii  adduser     3.134
ii  libc6       2.36-9+deb12u10
ii  libgcc-s1   12.2.0-14+deb12u1
ii  libstdc++6  12.2.0-14+deb12u1
ii  liburing2   2.3-3
ii  libzstd1    1.5.4+dfsg2-5

plocate recommends no packages.

Versions of packages plocate suggests:
ii  nocache         1.1-1+b1
ii  powermgmt-base  1.37
ii  systemd-sysv    252.38-1~deb12u1

-- Configuration Files:
/etc/updatedb.conf changed:
PRUNE_BIND_MOUNTS="no" # for /hdd bind mounts back into their desired locations
PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph 
/home/.ecryptfs /var/lib/schroot /hdd"
PRUNEFS="NFS afs autofs binfmt_misc ceph cgroup cgroup2 cifs coda configfs 
curlftpfs debugfs devfs devpts devtmpfs ecryptfs ftpfs fuse.ceph fuse.cryfs 
fuse.encfs fuse.glusterfs fuse.gocryptfs fuse.gvfsd-fuse fuse.mfs fuse.rclone 
fuse.rozofs fuse.sshfs fusectl fusesmb hugetlbfs iso9660 lustre lustre_lite mfs 
mqueue ncpfs nfs nfs4 ocfs ocfs2 proc pstore rpc_pipefs securityfs shfs smbfs 
sysfs tmpfs tracefs udev udf usbfs"


-- no debconf information

Reply via email to