Package: finger
Version: 0.17-15
Severity: important
File: /usr/bin/finger

Dear Maintainer,

I was writing a bash script to check if a person already had an account, to 
prevent people from having multiple accounts.
The script is very simple, but then I found this bug described below:

Suppose I have three persons:  "John Doe", "Little John" and "Mary Little John".
Lets say that theyr usernames are respectively: "john", "johnny" and "mary"

The problem is:
$ finger John
The command above will return only "Little John" and "Mary Little John"

if I use instead
$ finger john
The command above will return all the 3 people.

if I use
$ finger Little
The command above will correctly return "Little John" and "Mary Little John", 
since neither username is "little"


The last example:
$finger Mary Little John
The command above will return "Little John" and also "Mary Little John", but 
only because "Little" and "John" will make finger return Mary, since her 
username matches her name



TL:DR
finger command will not correctly find "User" if his username is also "user". I 
expected that "finger User" would result in the same as "finger user"



-- System Information:
Debian Release: 8.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 4.4.35-2-pve (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages finger depends on:
ii  libc6  2.19-18+deb8u7

finger recommends no packages.

finger suggests no packages.

-- no debconf information

Reply via email to