Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secureAbsNormPath isn't secure #6

Open
nomeata opened this issue Jun 19, 2011 · 0 comments
Open

secureAbsNormPath isn't secure #6

nomeata opened this issue Jun 19, 2011 · 0 comments

Comments

@nomeata
Copy link

nomeata commented Jun 19, 2011

Joey reports at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599676 against version 1.1.0.3:

Prelude System.Path> secureAbsNormPath "/home/joey" "/home/bob/foo"
Nothing

So far so good, and based on that and secureAbsNormPath's description,
you might expect it to be usaable to limit access to files in my home
directory. That is not the case:

Prelude System.Path> secureAbsNormPath "/home/joey" "/home/joeyish/foo"
Just "/home/joeyish/foo"

So to be "secure", the first parameter should end with a slash.
But, the documentation doesn't say that. Actually, it says "in many
cases, it would correspond to the current working directory". Note
that getCurrentDirectory does not return a directory with a trailing
slash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant