7 Commits

Author SHA1 Message Date
Veiko Aasa
eb7454d3b7
gitweb: Fix enable auth webserver component on app init
* Fixes the gitweb app initalization when there are no public
repositories and the apache2 configuration gitweb-freedombox-auth has
not been enabled before (this may happen when the git repositories or
apache2 configuration has been modified outside the plinth web UI).
* Fix comment in the gitweb-freedombox-auth.conf apache2 configuration
file.

Fixes #1928

Tests performed:
* The gitweb app unit and functional tests pass.
* Configured all gitweb repositories as private. Stopped the plinth
service. Disabled the apache2 configuration gitweb-freedombox-auth.
Then starting the plinth service succeeds and gitweb-freedombox-auth
configuration gets enabled.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-22 12:25:24 +05:30
Veiko Aasa
aaee9ec8a9
gitweb: Do not recursively scan for Git repositories
Temporary directories are now hidden when cloning remote repositories.

Fixes #1677

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-07 15:00:24 -08:00
Veiko Aasa
0b2d1265cb
gitweb: fix links that end with /HEAD
On the Gitweb site, links that end with /HEAD (for example menu links after
selecting 'tree' on the front page) are mistakenly redirected
to the git-http-backend cgi script and an empty page is shown to the user.

Modified Apache2 ScriptAliasMatch regex so that git-http-backend services get
redirected only if they immediately follow repository's name path component.
Links on Gitweb site have additional action component before /HEAD and those
will be handled by the gitweb cgi script.

The relevant git-http-backend source:
https://repo.or.cz/git/debian.git/blob/refs/tags/v2.20.1:/http-backend.c#l706

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-27 18:04:30 -07:00
Veiko Aasa
ea01ef6f80
gitweb: avoid global environment variables in Apache configuration
Closes #1671

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-27 12:07:22 -07:00
Veiko Aasa
4c13ef24bb
gitweb: enable rename detection
Closes #1666

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2019-10-21 10:41:58 -07:00
Sunil Mohan Adapa
3001099cda
gitweb: Fix issue with elevated access to private repositories
When using git-http-backend, both URLs ending with and without .git are allowed.
However, access restriction has only be applied for URLs ending with .git. This
means that private git repositories are clone-able by anonymous users by
removing the .git suffix in the URLs.

Fix the issue by extending the access restriction to cover URLs not ending with
.git.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-19 19:14:04 -07:00
Veiko Aasa
1b9dea4033
gitweb: New app for simple git hosting
Closes: #1658

Signed-off-by: Veiko Aasa veiko17@disroot.org
[sunil@medhas.org Minor styling and cosmetic changes]
[sunil@medhas.org Write comments for Apache configurations]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-19 19:13:54 -07:00