Skip Menu |

This queue is for tickets about the File-Locate-Harder CPAN distribution.

Report information
The Basics
Id: 53213
Status: new
Priority: 0/
Queue: File-Locate-Harder

People
Owner: Nobody in particular
Requestors: oid!nospm [...] fnord.to
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.05
Fixed in: (no value)



Subject: Security flaw
mode_shell actually uses the shell, thus one can use `STUFF` or $THINGS in a search string and thus execute `STUFF` etc.
At line ~634 this:
chomp (@results = `$locate_cmd`)
should be this, or thereabouts:
open RES,"-|","slocate",'-d',$db,$opt_str,$search_term; chomp( @results=<RES> ); close RES;

This breaks the usage of generate_locate_cmd which should likely be split into executable path and /(-q -d|-q --database=)/ etc.

At this point it seems better to stop using File::Locate(::Harder|) period and simply use code similar to above, as File::Locate seems broken for slocate and does not support mlocate.

[sm]locate itself seems to have broken regexp too =[