mpdroog / invoiced

Simple hour registration + invoice generator.
BSD 2-Clause "Simplified" License
13 stars 5 forks source link

launch command using tilde as shortcut for $HOME generates panic for Path Hack #19

Closed c-nv-s closed 3 years ago

c-nv-s commented 3 years ago

steps to reproduce:

after setup of folder structure per the README run

./invoiced -v -d=~/billingdb

and receive following error message:

panic: Path hack attempt: ~/billingdb

goroutine 1 [running]:
main.main()
        /root/go/src/github.com/mpdroog/invoiced/main.go:111 +0xd87
mpdroog commented 3 years ago

Your shell should expand the ~ into the home-dir, it's not thus it's rejected. Easy way to solve this (removing the equal-sign so Bash does replace it): ./invoiced -v -d ~/billingdb

c-nv-s commented 3 years ago

yes! oversight from me from copy/pasting the README you can update it and close this ticket

mpdroog commented 3 years ago

https://github.com/mpdroog/invoiced/commit/d2452649f78c81ae5a60ff614f8985526e804e15