"Require user" incomplete in SSL part of apache config after creation of git repo

Hi I thought to add the report. Delete if fixed already. (I searched)

In SSL part of apache:

<Location /git/myrepo.git>
Require user <user is missing>
</Location>

is incomplete after I create a git repo. After I add the user from the non-SSL, it works as expected.

OS: Jessie

Repro:

  • log in as the user to manage his git stuff
  • name a new git repo, and add a previously created user (not owner)
  • remove the owner that was default (maybe not important)
  • Enter to create

Webmin version 1.810 Virtualmin version 5.04 Theme version Authentic Theme 18.10

btw: Git repo config module was not available to users that had git enabled. Had to enable it manually.

Status: 
Closed (fixed)

Comments

Hmmm .. the code should be adding the users to both the SSL and non-SSL apache configs.

Which version of the Nginx plugin are you running? You can see this on the Features and Plugins page.

I can confirm the same behaviour for Virtualmin 5.04 gpl on Ubuntu Linux 16.04.

HTTP (Port 80):

<Location /git/myrepo.git>
Require user username1 username2
</Location>

HTTPS (Port 443):

<Location /git/myrepo.git>
Require user
</Location>

I found the problem, it's in virtualmin-git-lib.pl line 225.

local @ports = ( $d->{'web_port'} );
push(@port, $d->{'web_sslport'}) if ($d->{'ssl'});

The second line should also have @ports not @port. This fixed the problem for me.

Ah .. thanks for pointing this out. That will be fixed in the next release of the Git plugin.

Status: Active ยป Fixed