]> source.dussan.org Git - gitblit.git/log
gitblit.git
2 years agoMerge branch 'pr-1219' into master
Florian Zschocke [Sun, 6 Feb 2022 18:05:16 +0000 (19:05 +0100)]
Merge branch 'pr-1219' into master

This merges rebased and enhanced pull request #1219

2 years agoci: Remove Java 7 build
Florian Zschocke [Sun, 6 Feb 2022 14:25:36 +0000 (15:25 +0100)]
ci: Remove Java 7 build

2 years agobuild: Comment out option used for Java 7
Florian Zschocke [Sun, 6 Feb 2022 14:25:05 +0000 (15:25 +0100)]
build: Comment out option used for Java 7

2 years agodoc: Update documentation for new Java 8 minimum
Florian Zschocke [Sun, 6 Feb 2022 14:24:33 +0000 (15:24 +0100)]
doc: Update documentation for new Java 8 minimum

2 years agoUpdate readme for new min java version
paladox [Sat, 18 Mar 2017 19:18:18 +0000 (19:18 +0000)]
Update readme for new min java version

2 years agoBump min java support to 1.8
paladox [Sat, 18 Mar 2017 19:17:34 +0000 (19:17 +0000)]
Bump min java support to 1.8

Fixes #1218

2 years agoci: Transition to ICO image labels
Florian Zschocke [Sun, 6 Feb 2022 14:07:14 +0000 (15:07 +0100)]
ci: Transition to ICO image labels

2 years agoci: Allow to force build a nightly version
Florian Zschocke [Sun, 14 Nov 2021 11:03:46 +0000 (12:03 +0100)]
ci: Allow to force build a nightly version

Enable a switch for manual workflow triggering that overrides the check
if a new commits were made since the last build. If the input is set to
'true', a new build is run even when no new commits are present.

This is mainly so that changes to the gitblit-docker repo can be included
in builds. This could also be automated in the workflow, if need be.

2 years agoci: Test nightly docker image with Goss before pushing to registry
Florian Zschocke [Sat, 13 Nov 2021 22:32:48 +0000 (23:32 +0100)]
ci: Test nightly docker image with Goss before pushing to registry

2 years agoci: Add workflow for a nightly build of docker image
Florian Zschocke [Fri, 12 Nov 2021 11:58:24 +0000 (12:58 +0100)]
ci: Add workflow for a nightly build of docker image

2 years agoReadme: Fix link to nightly docker image
Florian Zschocke [Sat, 5 Feb 2022 16:50:03 +0000 (17:50 +0100)]
Readme: Fix link to nightly docker image

The link to the nightly docker images points to the actual image layer,
which is removed when a new nightly is pushed.
Instead, we should point to the images page, filtering on the tag 'nightly'.

2 years agoReset build identifiers for next minor release cycle
Florian Zschocke [Sat, 5 Feb 2022 15:51:19 +0000 (15:51 +0000)]
Reset build identifiers for next minor release cycle

2 years agoPrepare 1.9.2 release v1.9.2
flaix [Sat, 5 Feb 2022 15:27:55 +0000 (15:27 +0000)]
Prepare 1.9.2 release

2 years agosite: Fix awful HTML indentation
Florian Zschocke [Thu, 3 Feb 2022 19:25:45 +0000 (20:25 +0100)]
site: Fix awful HTML indentation

2 years agosite: Old packages moved from Bintray to Cloudsmith
Florian Zschocke [Thu, 3 Feb 2022 19:25:24 +0000 (20:25 +0100)]
site: Old packages moved from Bintray to Cloudsmith

Since Bintray seized operation, the packages for versions 1.4.0 - 1.8.0
have been uploaded to Cloudsmith. Adjust the links appropriately.

An attribution is added to comply with Cloudsmith's OSS hosting policy.

2 years agobuild: Determine release version with simple grep
Florian Zschocke [Thu, 13 Jan 2022 17:19:14 +0000 (18:19 +0100)]
build: Determine release version with simple grep

To determine what the release version is to be, use a simple grep over
the moxie.build file and cut off the `-SNAPSHOT` part. The moxie
tag command doesn't do anything else, either. But the problem is that
when using the moxie tag command on the release branch, where the
version has already been set to a release version, it would create
a second release version, like so: 1.9.2-1.

2 years agobuild: Allow for updating an existing draft release
Florian Zschocke [Thu, 16 Dec 2021 22:46:28 +0000 (23:46 +0100)]
build: Allow for updating an existing draft release

When creating a release draft and uploading assets, provision for the case
that a draft release already exists. In that case, instead of creating a
release, the existing release (changelog) is edited and the assets are
deleted before the new built ones are uploaded.

This commit also introduces the `${gh.repo}` property in build.xml,
so that the Github project could be chosen dynamically. Not really needed,
to be honest, but, yeah, whatever.

2 years agobuild: Add target to determine and report release version
Florian Zschocke [Thu, 16 Dec 2021 22:41:42 +0000 (23:41 +0100)]
build: Add target to determine and report release version

2 years agoBuild: create macro for creating the release process script
Florian Zschocke [Thu, 30 Jan 2020 20:47:12 +0000 (21:47 +0100)]
Build: create macro for creating the release process script

Refactor the creation of the release process script, from
`release.template` into a `macrodef`.
Add a new target `releaseScript`, so that the release script can be
created after the `tagRelease` target was run.
This is helpful if the `tagRelease` target is run by a different,
earlier process than the actual release creation process.

2 years agodoc: Update release notes
Florian Zschocke [Fri, 10 Dec 2021 13:14:34 +0000 (14:14 +0100)]
doc: Update release notes

2 years agoUpdate japanese translation
Takehide Morimoto [Tue, 27 Oct 2020 01:17:05 +0000 (10:17 +0900)]
Update japanese translation

2 years agoDetect and report if running in container
Florian Zschocke [Thu, 9 Dec 2021 23:10:04 +0000 (00:10 +0100)]
Detect and report if running in container

To help with analysis, try to detect if the instance is running inside
a container. Some containers are detected, but this is probably not
exhaustive. At least a Docker container should be detectable.
Report in the runtime manager to the log if a container was detected.

2 years agorun: Put variables in quotes in shell scripts
Florian Zschocke [Thu, 9 Dec 2021 20:34:17 +0000 (21:34 +0100)]
run: Put variables in quotes in shell scripts

2 years agoreadme: Add shields for license and nightly docker date
Florian Zschocke [Tue, 7 Dec 2021 21:01:04 +0000 (22:01 +0100)]
readme: Add shields for license and nightly docker date

2 years agopages: Fix repo-relative reference links in markdown docs
Florian Zschocke [Mon, 6 Dec 2021 20:03:04 +0000 (21:03 +0100)]
pages: Fix repo-relative reference links in markdown docs

As with explicit links, also for reference links in markdown documents
which point to repository-relative files the links are broken. They do
not take the path to the repository into account.
This fix is related to commit b23269 which fixed issue #1358
for explicit links.

2 years agoMerge branch 'fix-864' into master
Florian Zschocke [Sat, 4 Dec 2021 14:15:50 +0000 (15:15 +0100)]
Merge branch 'fix-864' into master

Merge fix for issue #864.

2 years agobug: Fix double encoding links in Markdown/Wiki pages
Florian Zschocke [Sat, 4 Dec 2021 14:05:58 +0000 (15:05 +0100)]
bug: Fix double encoding links in Markdown/Wiki pages

When parsing Markdown or Wiki pages, links get URL encoded. This happened
twice for links to other documents. Once explicitly and once by Wicket
when it creates a `urlFor` the page. That results in multi-byte
characters getting percent escaped, and then the percent character again
getting percent escaped.
The explicit encoding looks like a forgotten left over, so it gets
removed from the code. The Wicket encoding is smarter anyways, knowing
what is path and what is parameter.

This fixes #864.

2 years agoAdd tests for MarkupProcessor
Florian Zschocke [Thu, 25 Nov 2021 23:29:56 +0000 (00:29 +0100)]
Add tests for MarkupProcessor

2 years agodeps: Update to Jetty 9.2.30.v20200428
Florian Zschocke [Thu, 25 Nov 2021 15:59:43 +0000 (16:59 +0100)]
deps: Update to Jetty 9.2.30.v20200428

This closes #1390

2 years agoUpdate contributing guidelines
Florian Zschocke [Thu, 2 Dec 2021 21:05:50 +0000 (22:05 +0100)]
Update contributing guidelines

And, link to the contributing guidelines from the Readme.

2 years agodocs: Update release notes
Florian Zschocke [Thu, 25 Nov 2021 15:48:45 +0000 (16:48 +0100)]
docs: Update release notes

2 years agodocs: Update docker URL
Florian Zschocke [Thu, 25 Nov 2021 14:28:18 +0000 (15:28 +0100)]
docs: Update docker URL

Update the URL to the Gitblit docker image to point to the
`gitblit/gitblit` repository, which I now consider the official
Docker repository.
Also link to the Docker images on the main page.

2 years agodocs: Change Ohloh link to Open Hub
Florian Zschocke [Thu, 25 Nov 2021 13:48:18 +0000 (14:48 +0100)]
docs: Change Ohloh link to Open Hub

Ohloh got acquired by Synopsis and is nor Open Hub.
Change the Ohloh link in the links menu to point to Open Hub.

2 years agoChange bugtraq link for issues to Github
Florian Zschocke [Thu, 25 Nov 2021 16:17:31 +0000 (17:17 +0100)]
Change bugtraq link for issues to Github

2 years agoFixes external links broken in markdown rendering (#1392)
TomaszSzt [Thu, 18 Nov 2021 14:38:54 +0000 (15:38 +0100)]
Fixes external links broken in markdown rendering (#1392)

* This commit fixes what was broken in commit
https://github.com/gitblit/gitblit/commit/b23269acc0f460f583311c679d751925b8402563
due to #1358 issue

2 years agoFix NPE
Tom [Wed, 23 Nov 2016 17:30:48 +0000 (18:30 +0100)]
Fix NPE

Although it seems strange to have a RefModel with a referenced object
but a null Ref, Gitblit uses such RefModels for instance in
JGitUtils.getNotesOnCommit().

Be careful to do something sensible when that Ref is null.

2 years agoIssue #1011: do not serialize JGit commit objects
Tom [Wed, 26 Oct 2016 20:49:56 +0000 (22:49 +0200)]
Issue #1011: do not serialize JGit commit objects

JGit commit objects are a recursive data structure; they have links to
their parent commits. Serializing a JGit commit will try to recursively
serialize all reachable ancestors as faras they have been loaded. If
that ancestor chain is too long, a StackOverflowError is thrown during
Wicket's page serialization if a page has a reference to sucha JGit
commit.

Fixed by making sure that pages o not contain references to JGit
commits. Use the (existing) wrapper object RepositoryCommit instead.

* RepositoryCommit has a transient reference to the JGit commit and
  reads the commit from the repository upon de-serialization.
* RefModel is a similar case (JGit tags/branches may also have links
  to the commits they point to). Solved a bit differently by making it
  a pure data object by transferring the interesting data from the JGit
  object in the constructor.
* Change DataViews instantiated with RevCommit to use RepositoryCommit
  instead.
* Change inner anonymous DataViews to ensure they do not have a
  synthesized field referencing the "allRefs" map. Such a synthesized
  field would also get serialized, and then serialize JGit commits
  again.

Finally, remove non-transient logger instances in Wicket classes. Those
might lead to NotSerializableException.

These StackOverflowErrors have been reported in several places since
2014:

* https://groups.google.com/forum/#!topic/gitblit/GH1d8WSlR6Q
* https://bugs.chromium.org/p/gerrit/issues/detail?id=3316
* https://groups.google.com/d/msg/repo-discuss/Kcl0JIGNiGk/0DjH4mO8hA8J
* https://groups.google.com/d/msg/repo-discuss/0_P6A3fjTec/2kcpVPIUAQAJ
* https://github.com/gitblit/gitblit/issues/1011
* https://github.com/tomaswolf/gerrit-gitblit-plugin/issues/21

2 years agoMerge branch pr1343 into master
Florian Zschocke [Wed, 3 Nov 2021 19:18:44 +0000 (20:18 +0100)]
Merge branch pr1343 into master

Merge the edited PR #1343 from @vhot2076. This merge only includes the
russian translation.

I could not reproduce the layout error, so a new PR with more information
should be created if the problem still exists. This merge closes #1343

2 years agoAdd test for loading russian properties
Florian Zschocke [Wed, 3 Nov 2021 19:14:50 +0000 (20:14 +0100)]
Add test for loading russian properties

2 years agoAdding Russian Translate Добавлен русский язык
Vladimir A [Thu, 16 Jul 2020 11:26:51 +0000 (14:26 +0300)]
Adding Russian Translate Добавлен русский язык

2 years agoMerge pull request #1383 from flaix/encode-raw-links
Florian Zschocke [Tue, 26 Oct 2021 17:52:20 +0000 (19:52 +0200)]
Merge pull request #1383 from flaix/encode-raw-links

raw: URL encode the links to raw view of files

2 years agoraw: URL encode the links to raw view of files 1383/head
Florian Zschocke [Sun, 24 Oct 2021 15:55:36 +0000 (17:55 +0200)]
raw: URL encode the links to raw view of files

So far links to raw view were not encoded. The browser did some encoding
of spaces on its own, which the servlet would unescape, since it uses
the `HttpServletRequest.getPathInfo` method. That decodes the path
before returning it.
A problem arises when a bracket is in the file (or folder) name. The
brackets are the characters that are not allowed in the path, according
to the `URI.parse` method. (Which is a bit harsh, because brackets
actually are only reserved for the host part since IPv6.) That means
that the decoding fails when a bracket character is encountered.
This went unnoticed since the failed decoding will return the path
as it got it. But once there is a space in the file name, which the
browser helpfully encoded for us, the failed decoding will now leave the
encoded space in there. And that will result in a path that does not
exist, e.g. `file%20[a]`.

To be on the safe side, we simply encode the path in the links that we
generate, so that it complies with the rules that are used in `getPathInfo`.

This fixes #1375.

2 years agoMerge pull request #1382 from flaix/wip-fix-daysAgo
Florian Zschocke [Sat, 23 Oct 2021 23:48:39 +0000 (01:48 +0200)]
Merge pull request #1382 from flaix/wip-fix-daysAgo

Fix incorrect display of "days ago" on activity page

2 years agoTimeUtils: Change daysAgo to calculate difference in calendar days 1382/head
Florian Zschocke [Sat, 23 Oct 2021 22:44:18 +0000 (00:44 +0200)]
TimeUtils: Change daysAgo to calculate difference in calendar days

The `daysAgo` method seemed to want to normalize on a calendar day? I
can't really tell what it was trying to do, but the problem is that it
does not take into account any time shift due to time zones so it never
really worked outside of GMT.
So instead a new `calendarDaysAgo` method is added (because I am unsure
on what the `daysAgo` method is trying to do. It can probably be removed).
The new method cleanly calculates difference in calendar days because it
normalizes the two given time stamps on the same time zone.

The `timeAgo` method now used the new method. This fixes #1248.

2 years agoTimeUtils: Move unit test to same package as TimeUtils is
Florian Zschocke [Sat, 23 Oct 2021 21:41:25 +0000 (23:41 +0200)]
TimeUtils: Move unit test to same package as TimeUtils is

For some reason the `TimeUtilsTest` class is, like almost all tests, in
the `com.gitblit.tests` package. But this way all methods in classes
which we might predominately need for tests have to be public.
So move the unit test class `TimeUtilsTest` to the same package as the
class it is testing, i.e. `com.gitblit.utils.TimeUtils`.
This way we ca set the new added methods which get the current time
passed in to be at least not public.

2 years agoTimeUtils: Increase testability and add tests
Florian Zschocke [Sat, 23 Oct 2021 21:20:47 +0000 (23:20 +0200)]
TimeUtils: Increase testability and add tests

Add tests for `timeAgo` to analyse issue #1248.
The tests are dependent on when they run as they time functions use the
current date and time. To make them testable in a reproducible way, we
need the ability to pass in what we think is "now". So add overloaded
methods that take a `now` parameter so that we can pass in the current
time.

2 years agoMerge pull request #1381 from edram/master
Florian Zschocke [Fri, 22 Oct 2021 18:05:15 +0000 (20:05 +0200)]
Merge pull request #1381 from edram/master

Fix mirrored http(s) with a username and password

2 years agoMerge pull request #1380 from flaix/fix-resource-bundle
Florian Zschocke [Fri, 22 Oct 2021 17:47:06 +0000 (19:47 +0200)]
Merge pull request #1380 from flaix/fix-resource-bundle

Fix resource bundle

2 years agoFix mirrored http(s) with a username and password 1381/head
edram [Fri, 22 Oct 2021 06:54:03 +0000 (14:54 +0800)]
Fix mirrored http(s) with a username and password

This fixes #1059

2 years agoProperty bundle: Fix typo in "nl" language file 1380/head
Florian Zschocke [Thu, 21 Oct 2021 20:42:34 +0000 (22:42 +0200)]
Property bundle: Fix typo in "nl" language file

2 years agoProperty bundle: Fix various errors with escapes
Florian Zschocke [Thu, 21 Oct 2021 20:42:04 +0000 (22:42 +0200)]
Property bundle: Fix various errors with escapes

Double escaped backslashes, wrongly escaped unicode codes, broken escaped
newlines.

2 years agoProperty bundle: Fix incorrect property keys
Florian Zschocke [Thu, 21 Oct 2021 20:03:12 +0000 (22:03 +0200)]
Property bundle: Fix incorrect property keys

Some property keys had typos.
There is a `gb.ticketStatus` and a `gb.ticketState`. Neither is used
anywhere in the code, but only the former is defined in the default file.
So only use `gb.ticketStatus`.

2 years agoEscape non-ASCII characters in the GitBlitWebApp_pt_BR.properties file
Florian Zschocke [Thu, 21 Oct 2021 19:30:11 +0000 (21:30 +0200)]
Escape non-ASCII characters in the GitBlitWebApp_pt_BR.properties file

If keeps acting up when trying to stage parts of it. I hope this fixes that.

2 years agofix: Remove trailing spaces from property bundle files
Florian Zschocke [Thu, 21 Oct 2021 19:26:46 +0000 (21:26 +0200)]
fix: Remove trailing spaces from property bundle files

2 years agofix: Remove duplicate property keys from properties files
Florian Zschocke [Thu, 21 Oct 2021 19:02:11 +0000 (21:02 +0200)]
fix: Remove duplicate property keys from properties files

Some property keys were duplicated, mostly `status`, `permission` and
`comment`.
The problem with `gb.comment` is, that it is used in two different
locations in two different meanings. One as a verb, the second as a
noun. Which makes no difference in English, but other languages.
The solution is that the second key is renamed to `gb.sshKeyComment`.
The code is adjusted accordingly.

2 years agoMerge pull request #1379 from flaix/fix-no-properties
Florian Zschocke [Thu, 21 Oct 2021 06:41:00 +0000 (08:41 +0200)]
Merge pull request #1379 from flaix/fix-no-properties

Fix norwegian properties file

2 years agoAdd a unit test to check if the resource bundle can be loaded 1379/head
Florian Zschocke [Wed, 20 Oct 2021 19:05:02 +0000 (21:05 +0200)]
Add a unit test to check if the resource bundle can be loaded

To prevent that we have a resource file in a resource bundle broken and
not loading undiscovered for years, add a unit test that will load the
resource properties file for each of the languages.
In order to check if the file was loaded and the bundle mechanism
didn't fall back on the default, a new property key is added to each
language file, solely for the purpose to be checked in the unit test.

2 years agoFix a wrong unicode escape in the Norsk language properties file
Florian Zschocke [Wed, 20 Oct 2021 18:34:32 +0000 (20:34 +0200)]
Fix a wrong unicode escape in the Norsk language properties file

This fixes #834

3 years agoMerge pull request #1370 from Zwixx/master
Florian Zschocke [Wed, 21 Jul 2021 18:05:56 +0000 (20:05 +0200)]
Merge pull request #1370 from Zwixx/master

This commit merges the pull request from Zwixx, with additional
changes via a separate Zwixx-fix-cmds branch.

Closes #1370

3 years agoFix output of migrate-/reindex-tickets bash scripts
Florian Zschocke [Wed, 21 Jul 2021 07:58:55 +0000 (09:58 +0200)]
Fix output of migrate-/reindex-tickets bash scripts

Fix the output of the help texts in the reindex-tickets and
reindex-tickets bash scripts.
For one the double quotes are unnecessary and get printed out, too.
Secondly, an empty line needs a `echo.`. A simple `echo` will prin the
state of the echo setting, i.e. `Echo is enabled (1)` or something similar.

3 years agoSet local variable visibility in batch scripts
Florian Zschocke [Wed, 21 Jul 2021 07:54:27 +0000 (09:54 +0200)]
Set local variable visibility in batch scripts

Use SETLOCAL in batch scripts to restrict the visibility of variables
that are set in the script to the script execution. Otherwise the variables
will also be set in the calling shell. That is not a problem when a script
is executed by double clicking it in Windows Explorer. But now that the
scripts are changed so that they can be called on the command line from
other folders, they should also no clutter the calling environment.

3 years agoAdjust remaining CMD scripts to use Gitblit home path.
Florian Zschocke [Wed, 21 Jul 2021 07:50:59 +0000 (09:50 +0200)]
Adjust remaining CMD scripts to use Gitblit home path.

Use the path of the script for the Gitblit home path in the remaining
batch scripts, too, to make it possible to call them from any other folder.

3 years agoAdd this into the install/uninstall and reindex of the service too
Zwixx [Wed, 26 May 2021 15:47:17 +0000 (17:47 +0200)]
Add this into the install/uninstall and reindex of the service too

3 years agoUse full path to Gitblit directory in batch scripts
Zwixx [Wed, 26 May 2021 15:05:26 +0000 (17:05 +0200)]
Use full path to Gitblit directory in batch scripts

In order to call the Windows batch scripts on the command line
from a different folder, the path to the files in the Gitblit
directory needs to be explicitly stated in the Java command.
Otherwise the JAR files or data directory are not found as they
would be searched in the current directory.

3 years agoFix: Make CPU hog fix Java 7 compatible
Florian Zschocke [Wed, 14 Jul 2021 19:23:28 +0000 (21:23 +0200)]
Fix: Make CPU hog fix Java 7 compatible

The last fix for the stored config merged from Curly060 used Java8-isms.
In order to be able to include this fix in the next release, which will
be for 1.9, I have converted this to be compatible with Java 7.

Also, a file header was added to place it under APL.

3 years agobugfix: fix CPU hog bug in config save
Ingo Lafrenz [Thu, 18 Mar 2021 14:45:02 +0000 (15:45 +0100)]
bugfix: fix CPU hog bug in config save

3 years agoMerge pull request #1367 from YMNNs/master
Florian Zschocke [Sat, 15 May 2021 17:58:59 +0000 (19:58 +0200)]
Merge pull request #1367 from YMNNs/master

Update simplified Chinese translation

3 years agoUpdate zh_CN translation 1367/head
YMNNs [Mon, 3 May 2021 11:53:38 +0000 (19:53 +0800)]
Update zh_CN translation

Updated simplified Chinese translation and added missing entries. This translation is now 100% completed.

3 years agodocs: Change Ohloh link to Open Hub
Florian Zschocke [Mon, 23 Nov 2020 19:28:11 +0000 (20:28 +0100)]
docs: Change Ohloh link to Open Hub

Ohloh got acquired by Synopsis and is nor Open Hub.
Change the links for the tiny widget to point to Open Hub.

Closes #1356

3 years agodocs: Release notes update
Florian Zschocke [Mon, 16 Nov 2020 20:15:59 +0000 (21:15 +0100)]
docs: Release notes update

3 years agofix: Also parse exp links in MD pages
Florian Zschocke [Mon, 16 Nov 2020 20:10:24 +0000 (21:10 +0100)]
fix: Also parse exp links in MD pages

Add a link parser also for `ExpLinks` because we need to escape paths
to files in subfolders.
This closes #1358

3 years ago📖 docs: Add missing change to 1.8.0 release notes
Florian Zschocke [Mon, 9 Nov 2020 22:25:05 +0000 (23:25 +0100)]
📖 docs: Add missing change to 1.8.0 release notes

Add that issue 879 was fixed in release 1.8.0

3 years agoMerge branch 'fix-raw-slash-branch' into master
Florian Zschocke [Mon, 9 Nov 2020 23:07:34 +0000 (00:07 +0100)]
Merge branch 'fix-raw-slash-branch' into master

3 years agoraw: Fix raw links to branches with a slash in their name
Florian Zschocke [Mon, 9 Nov 2020 22:08:22 +0000 (23:08 +0100)]
raw: Fix raw links to branches with a slash in their name

When a branch has a slash in the name, the raw servlet was not able
to find the path under that branch. This is due to the replacement of
the forward slash character for URLs. It was not taken into account
when comparing the branch name later.

This fixes #1290 and its duplicates #1234 and #813.

3 years agoraw: Fix getPath with trailing slash that was escaped
Florian Zschocke [Mon, 9 Nov 2020 19:27:31 +0000 (20:27 +0100)]
raw: Fix getPath with trailing slash that was escaped

While this may be an unlikely scenario, let's still prevent this.
When a link was created for a path that ends in a trailing slash,
that trailing slash would be replaced with the `forwardSlashCharacter`.
But in getPath that final slash would be transformed back *after* the
check to chop off trailing slashes. This is now switched so that such a
trailing slash is also chopped off.

3 years agoraw: Fix getPath with lead-ins or missing trailing slashes after the branch.
Florian Zschocke [Mon, 9 Nov 2020 19:21:08 +0000 (20:21 +0100)]
raw: Fix getPath with lead-ins or missing trailing slashes after the branch.

3 years agoraw: Refactor RawServlet:getBranch and :getPath parameters
Florian Zschocke [Sun, 8 Nov 2020 16:19:35 +0000 (17:19 +0100)]
raw: Refactor RawServlet:getBranch and :getPath parameters

Refactor the `getBranch` and `getPath` methods to take a String as
second parameter, which is the already sanitised path info. Don't get
the path info from a passed in request anymore.

The methods are only ever called from within `processRequest`, which
already does some checks on the path info, like removing a leading
slash character. So no need to do that every time again the methods
and passing a request for that.

3 years agoraw: Fix exceptions when no path info is given to raw servlet
Florian Zschocke [Sat, 7 Nov 2020 18:56:51 +0000 (19:56 +0100)]
raw: Fix exceptions when no path info is given to raw servlet

3 years agoraw: Strip leading and trailing slash from repo and path names for link
Florian Zschocke [Wed, 4 Nov 2020 19:35:31 +0000 (20:35 +0100)]
raw: Strip leading and trailing slash from repo and path names for link

When creating a link for raw display, a trailing slash is stripped from
the end of the base URL. Also do this for the repository, as well as
stripping leading slashes from the repository and the path values.

3 years agobuild: Upload coverage report also to CodeClimate and Codacy
Florian Zschocke [Thu, 5 Nov 2020 22:07:18 +0000 (23:07 +0100)]
build: Upload coverage report also to CodeClimate and Codacy

3 years agoMerge pull request #1350 from flaix/upgrade-mockito
Florian Zschocke [Sat, 31 Oct 2020 20:45:59 +0000 (21:45 +0100)]
Merge pull request #1350 from flaix/upgrade-mockito

deps: Upgrade dependency Mockito to 2.28.2.

3 years agodeps: Upgrade dependency Mockito to 2.28.2. 1350/head
Florian Zschocke [Sat, 31 Oct 2020 15:50:29 +0000 (16:50 +0100)]
deps: Upgrade dependency Mockito to 2.28.2.

3 years agoMerge pull request #1349 from flaix/issue-1150
Florian Zschocke [Fri, 30 Oct 2020 08:25:28 +0000 (09:25 +0100)]
Merge pull request #1349 from flaix/issue-1150

Fix 1150: Use external link instead of internal wiki link

3 years agoFix 1150: Use external link instead of internal wiki link for tickets_setup 1349/head
Florian Zschocke [Thu, 29 Oct 2020 11:41:20 +0000 (12:41 +0100)]
Fix 1150: Use external link instead of internal wiki link for tickets_setup

The `tickets_overview` page links to the `tickets_setup` page using a
wiki style internal link: `[[tickets setup]]`. Whatever library is
interpreting that is creating a link under the assumption that the
resulting page will be called `tickets-setup.html`. But that is not the
convention used by Moxie, which will use the source file name and thus
create a file called `tickets_setup.html`.

I was not able to find out which of the many libraries included is the
one that parses this file and creates the link. Messy.

There are two solutions. One is to configure the Moxie site build to
generate the file as `tickets-setup.html`. But this would break any
links to that page that might exist somewhere on the Interweb. So I
opted for the other option, which is to not use wiki syntax for the
reference to the local page but normal markdown syntax. This is not
a wiki, afterall.

3 years agoMerge pull request #1348 from flaix/ci-coverage
Florian Zschocke [Fri, 23 Oct 2020 07:42:51 +0000 (09:42 +0200)]
Merge pull request #1348 from flaix/ci-coverage

build: Create single XML JaCoCo report

3 years agoci: Enable upload to Codecov.io in CircleCI J8 build. 1348/head
Florian Zschocke [Thu, 22 Oct 2020 19:59:47 +0000 (21:59 +0200)]
ci: Enable upload to Codecov.io in CircleCI J8 build.

3 years agobuild: Activate JaCoCo explicitly for Ant build
Florian Zschocke [Thu, 22 Oct 2020 18:43:45 +0000 (20:43 +0200)]
build: Activate JaCoCo explicitly for Ant build

When building with Ant, instead of Moxie, JaCoCo is not included in the
classpath. So explicitly initialise the full `jacocoant.jar` from the
`.moxie` repository.

For this we had to switch the dependency to use the `nodeps` jar which
includes all dependencies.

3 years agobuild: Create single XML JaCoCo report
Florian Zschocke [Thu, 22 Oct 2020 15:42:01 +0000 (17:42 +0200)]
build: Create single XML JaCoCo report

This can be uploaded to coverage services like Coveralls etc.

3 years agoAdd contributing guidelines
Florian Zschocke [Tue, 20 Oct 2020 13:33:22 +0000 (15:33 +0200)]
Add contributing guidelines

Add some guidelines for contributors regarding pull requests,
commits and code conventions.

4 years agoMerge pull request #1345 from davehofmann/master
Florian Zschocke [Sat, 29 Aug 2020 08:34:57 +0000 (10:34 +0200)]
Merge pull request #1345 from davehofmann/master

Add service scripts for FreeBSD

4 years agoAdd service scripts for FreeBSD 1345/head
David Hofmann [Tue, 4 Aug 2020 15:47:33 +0000 (17:47 +0200)]
Add service scripts for FreeBSD

4 years agoReset build identifiers for next point release cycle
fzs [Sun, 5 Apr 2020 11:18:04 +0000 (11:18 +0000)]
Reset build identifiers for next point release cycle

4 years agoPrepare 1.9.1 release v1.9.1
fzs [Sun, 5 Apr 2020 11:13:00 +0000 (11:13 +0000)]
Prepare 1.9.1 release

4 years ago📖docs: Add update of service scripts in upgrade GO documentation
Florian Zschocke [Sun, 5 Apr 2020 10:28:58 +0000 (12:28 +0200)]
📖docs: Add update of service scripts in upgrade GO documentation

Also: release notes.

4 years ago🏃 run: Fix Linux service scripts to use classpath and class
Florian Zschocke [Sun, 5 Apr 2020 10:05:14 +0000 (12:05 +0200)]
🏃 run: Fix Linux service scripts to use classpath and class

Update the service scripts to use `-cp` and specify the GitBlitServer
class, instead of the `-jar` parameter.

Fixes #1333

4 years ago🏃run: Use quotes around class path in scripts
Florian Zschocke [Sat, 4 Apr 2020 19:34:30 +0000 (21:34 +0200)]
🏃run: Use quotes around class path in scripts

While most systems will not need the class path passed to the JVM with
the `-cp` parameter to be in quotes, apparently some exist where that
will not work without the quotes, e.g. FreeBSD.
So always use quotes for the class path in all scripts.

Issue #1333

4 years agoChange tests in shell scripts to be more compatible with Bourne shell
Florian Zschocke [Sat, 4 Apr 2020 18:29:12 +0000 (20:29 +0200)]
Change tests in shell scripts to be more compatible with Bourne shell

This is needed for the scripts to work in Alpine Linux, which
comes with a Bourne shell.

4 years agoDelete password from memory in AuthenticationManager
Florian Zschocke [Sat, 4 Apr 2020 17:43:35 +0000 (19:43 +0200)]
Delete password from memory in AuthenticationManager

Zero out the password to remove it from memory after use.
This is only a first step, implementing it for one method:
`AuthenticationManager.authenticate(String, char[], String)`.

4 years ago🦟 fix: Password hash upgrade kills existing passwords
Florian Zschocke [Sat, 4 Apr 2020 17:25:27 +0000 (19:25 +0200)]
🦟  fix: Password hash upgrade kills existing passwords

The upgrade of a MD5 stored password hash to a PBKDF password hash
destroys the stored password. The has check zeroes out the password that
is tested, so that the new hash is built over the zeroed out value.

This fix prevents that an also adds a check to the test.

Fixes #1335

4 years agodocu: Fix typo
Florian Zschocke [Sat, 7 Mar 2020 11:01:08 +0000 (12:01 +0100)]
docu: Fix typo