This code currently works only by assuming that the language code is either 2 or
5 chars long. This is not entirely correct but works for now.
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Follow common code so that extending becomes easier.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Follow common code so that extending becomes easier.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This is a good practice and maybe related to commit 83337e47
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This prevents writing to an arbitrary directory if running actions script
as a root user.
- Included tests for invalid names
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil@medhas.org Parametrize the test case]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
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>
Perhaps due to recent changes in distutils, the setup script fails during
install with an error that it is unable to copy actions/__pycache__. Don't
attempt to copy this directory.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Otherwise, if the backup contains public repos and state before backup is all
private repos, then gitweb interface is not available publicly after restore.
Similar case happens when all restore repos are private and state before that
contains a public repos.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
- add eleven functional tests
- gitweb_configure.html template: add id to the repository list element
to distinct it better.
Closes#1668
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This issue is caused by use of tmpdir fixture which forces the tests to run in a
temporary directory and HTML report to also get generated there.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
When tmpdir fixture is used, the tests run in a separate directory instead of
command execution directory. Any tests that take the current directory and
assume that it contains files will fail. Fix this by taking the path relative to
test module instead.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Stop building plinth package.
This will spark removal of package from unstable as it will not be built for any
source package (NBS, "not built from source") by the "cruft-report" tool.
Eventually it will also be removed from testing as there are not dependencies on
it.
See: https://wiki.debian.org/ftpmaster_Removals
Removal from backports may require filing a ticket in RT.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- after enabling application, do not enable Apache auth configuration
if a public repository exist.
Closes#1669
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Matthias Dellweg <2500@gmx.de>
[sunil@medhas.org Implement set domain as superuser action to make it succeed]
[sunil@medhas.org Minor cosmetic changes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Closes: #1659.
When shortcuts have login_required=False and allow_groups set to a list of
groups, the current behavior for logged in users is to match for allowed_groups
even when login_required is False. Thus, for searx, when public mode is enabled
searx shortcut is not shown for logged in users who are not part of searx group.
Fix this by ignoring allowed_groups if login_required is False.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>