Re: Make Gitweb behave like Apache mod_userdir

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Make Gitweb behave like Apache mod_userdir

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:44

"J.H." [off-list ref] writes:
For starters I think overriding the /~<user> (specifically the ~ here)
is going to be a bad idea no matter what you do and gives the wrong
impression about what / how the request is being responded to.  You
might want to try and pick a different delimiter or re-work the rule
so that you could have something like:

	http://git.kernel.org/<gitweb urls>
	http://git.kernel.org/user/<gitweb urls>
I am not objecting but showing my ignorance, but why is it a bad idea to
allow

	http://git.kernel.org/~junio/git.git

to map to /home/junio/pubilic_git/git.git when

	http://www.kernel.org/~junio/index.html

maps to /home/junio/public_html/index.html already?

Re: Make Gitweb behave like Apache mod_userdir

From: J.H. <hidden>
Date: 2016-06-15 22:47:44

Junio C Hamano wrote:
"J.H." [off-list ref] writes:
quoted
For starters I think overriding the /~<user> (specifically the ~ here)
is going to be a bad idea no matter what you do and gives the wrong
impression about what / how the request is being responded to.  You
might want to try and pick a different delimiter or re-work the rule
so that you could have something like:

	http://git.kernel.org/<gitweb urls>
	http://git.kernel.org/user/<gitweb urls>
I am not objecting but showing my ignorance, but why is it a bad idea to
allow

	http://git.kernel.org/~junio/git.git

to map to /home/junio/pubilic_git/git.git when

	http://www.kernel.org/~junio/index.html

maps to /home/junio/public_html/index.html already?
I'm not objecting to the mapping, I'm objecting to the use of the ~ 
specifically, since that's the default for mod_userdir - it's more or 
less a race condition waiting to happen with respect to does mod_rewrite 
get to and process it first or does mod_userdir.

Case in point should:

assuming that www.example.com (to get away from the specifics of 
kernel.org) is running gitweb but you also wanted to allow users to show 
their ~/public_html directories then

	http://www.example.org/~junio/

could be ambiguous as to what should / is servicing the url.

Now in reality it should work because of how apache is setup, but I 
would argue it's a bad practice to overload the '~' designator like that 
for use in gitweb specifically.

If you have mod_userdir disabled / not available this isn't an issue, 
but making that assumption might be a bad idea.

- John 'Warthog9' Hawley

Re: Make Gitweb behave like Apache mod_userdir

From: J.H. <hidden>
Date: 2016-06-15 22:47:44

Junio C Hamano wrote:
"J.H." [off-list ref] writes:
quoted
For starters I think overriding the /~<user> (specifically the ~ here)
is going to be a bad idea no matter what you do and gives the wrong
impression about what / how the request is being responded to.  You
might want to try and pick a different delimiter or re-work the rule
so that you could have something like:

	http://git.kernel.org/<gitweb urls>
	http://git.kernel.org/user/<gitweb urls>
I am not objecting but showing my ignorance, but why is it a bad idea to
allow

	http://git.kernel.org/~junio/git.git

to map to /home/junio/pubilic_git/git.git when

	http://www.kernel.org/~junio/index.html

maps to /home/junio/public_html/index.html already?
I'm not objecting to the mapping, I'm objecting to the use of the ~ 
specifically, since that's the default for mod_userdir - it's more or 
less a race condition waiting to happen with respect to does mod_rewrite 
get to and process it first or does mod_userdir.

Case in point should:

assuming that www.example.com (to get away from the specifics of 
kernel.org) is running gitweb but you also wanted to allow users to show 
their ~/public_html directories then

	http://www.example.org/~junio/

could be ambiguous as to what should / is servicing the url.

Now in reality it should work because of how apache is setup, but I 
would argue it's a bad practice to overload the '~' designator like that 
for use in gitweb specifically.

If you have mod_userdir disabled / not available this isn't an issue, 
but making that assumption might be a bad idea.

- John 'Warthog9' Hawley
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help