Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] git-daemon extra paranoia

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:09

"H. Peter Anvin" [off-list ref] writes:
Consider the whitelist/blacklist scenario I described in the previous 
email.  You have:

whitelist:	/pub/scm
blacklist:	/pub/scm/foo/bar.git

If you can bypass the blacklist by using the pathname /pub/scm/foo/bar, 
that's bad.
I like the simplicity of the check Linus suggested.  Given
/pub/scm/fora/../foo/bar/, you would end up chdir() to
/pub/scm/foo/bar.git and getcwd() would hit the blacklist
entry.  Which almost means that you do not even need path_ok()
;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help