]> source.dussan.org Git - gitblit.git/log
gitblit.git
4 years agoMerge branch 'master' into release r1.9.1
Florian Zschocke [Sun, 5 Apr 2020 11:07:25 +0000 (13:07 +0200)]
Merge branch 'master' into 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

4 years agoSwitch Eclipse repositories to HTTPS.
Florian Zschocke [Wed, 1 Apr 2020 11:31:59 +0000 (13:31 +0200)]
Switch Eclipse repositories to HTTPS.

The Eclipse maven repositories changed to only allow HTTPS and not
serve HTTP anymore. HTTP will redirect to HTTPS, which moxie does
not handle well and fails.

So the registered Eclipse repositories are changed to 'https://'
transport.

Fixes #1334

4 years agoFix download link in README file.
Florian Zschocke [Sun, 2 Feb 2020 11:18:56 +0000 (12:18 +0100)]
Fix download link in README file.

4 years agoReset build identifiers for next point release cycle
fzs [Sat, 1 Feb 2020 09:51:13 +0000 (09:51 +0000)]
Reset build identifiers for next point release cycle

4 years agoPrepare 1.9.0 release v1.9.0
fzs [Sat, 1 Feb 2020 09:46:15 +0000 (09:46 +0000)]
Prepare 1.9.0 release

4 years agoci: Set GitHub org to `gitblit` for release. r1.9.0
Florian Zschocke [Sat, 1 Feb 2020 09:31:18 +0000 (10:31 +0100)]
ci: Set GitHub org to `gitblit` for release.

4 years agoOnly run the release workflow in my repo fzs/gitblit
Florian Zschocke [Sat, 1 Feb 2020 08:53:51 +0000 (09:53 +0100)]
Only run the release workflow in my repo fzs/gitblit

4 years agoci: Remove incorrect changes from the Maven artifacts.json file
Florian Zschocke [Sat, 1 Feb 2020 08:35:57 +0000 (09:35 +0100)]
ci: Remove incorrect changes from the Maven artifacts.json file

Moxie's deploy task updates the `artifacts.json` file in the Maven
repository. But it does rewrite the whole file, not just add the
newly deployed artifacts. Which causes the "last updated" dates for
all artifacts in the repository to be rewritten.
In our case, where the repository is a Git repo, if the Git repo is a
fresh checkout, that resets all the dates to the checkout date.
Therefore we adjust the `artifacts.json` file to only keep the
update for the newly deployed artifacts, removing the other updates
for the dates with some awk magic.

4 years agoci: Ignore all branches starting with `release`.
Florian Zschocke [Fri, 31 Jan 2020 19:31:17 +0000 (20:31 +0100)]
ci: Ignore all branches starting with `release`.

Set the ignored branches pattern to `release*` for the normal ci workflow.

4 years agoAdd workflow to run a release against gitblit/gitblit
Florian Zschocke [Thu, 30 Jan 2020 20:48:17 +0000 (21:48 +0100)]
Add workflow to run a release against gitblit/gitblit

4 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.

4 years agoBuild: Set GitHub org to `gitblit` for release.
Florian Zschocke [Fri, 31 Jan 2020 19:16:52 +0000 (20:16 +0100)]
Build: Set GitHub org to `gitblit` for release.

4 years agoMerge branch 'release-github' into master
Florian Zschocke [Thu, 30 Jan 2020 21:13:10 +0000 (22:13 +0100)]
Merge branch 'release-github' into master

4 years agoBuild: Store release version information in file.
Florian Zschocke [Thu, 30 Jan 2020 20:42:13 +0000 (21:42 +0100)]
Build: Store release version information in file.

If requested, by setting a file name in the `versionInfo`
property, store release version and tag in a file, for
other scripts and programs to pick up.

4 years agoDoc: Fix change log in built-in docs
Florian Zschocke [Tue, 28 Jan 2020 20:26:12 +0000 (21:26 +0100)]
Doc: Fix change log in built-in docs

Use the same templates as in `buildSite` to generate the change log
in the built-in documentation.

4 years agoBuild: Fix output prints
Florian Zschocke [Tue, 28 Jan 2020 20:23:25 +0000 (21:23 +0100)]
Build: Fix output prints

4 years agoAdd Maven Central to registeredRepositories
Florian Zschocke [Tue, 28 Jan 2020 12:53:39 +0000 (13:53 +0100)]
Add Maven Central to registeredRepositories

Moxie does have these defined by default, but with transport HTTP.
Since January 2020, Maven Central only accepts HTTPS, no HTTP
anymore. So we add them here explicitly, with `https://`.
We add it to the `build.moxie` file, instead of keeping it in a
local `settings.moxie`, so that a CI server can immediately use it.

4 years agoDoc: Change download button on Readme to point to GitHub
Florian Zschocke [Tue, 28 Jan 2020 12:40:37 +0000 (13:40 +0100)]
Doc: Change download button on Readme to point to GitHub

4 years agoDoc: Remove Google+ from Readme
Florian Zschocke [Tue, 28 Jan 2020 10:44:55 +0000 (11:44 +0100)]
Doc: Remove Google+ from Readme

Since Google Plus doesn't exist any more...

4 years agoDoc: Update built-in docs with missing pages and links
Florian Zschocke [Mon, 27 Jan 2020 20:53:15 +0000 (21:53 +0100)]
Doc: Update built-in docs with missing pages and links

Add pages for `fail2ban` and GFS to the `generateDocs` target, so that
they also show up in the documentation on GO etc.
Also adjust the links to issues and commits.

Add the replacement of the download base URL.

4 years agoUse GitHub org property in octokit calls
Florian Zschocke [Mon, 27 Jan 2020 20:46:23 +0000 (21:46 +0100)]
Use GitHub org property in octokit calls

4 years agoAdd Twitter link to site overview and built-in docs.
Florian Zschocke [Mon, 27 Jan 2020 20:43:01 +0000 (21:43 +0100)]
Add Twitter link to site overview and built-in docs.

4 years agoSite: Remove link to Bintray update notifications
Florian Zschocke [Mon, 27 Jan 2020 20:42:17 +0000 (21:42 +0100)]
Site: Remove link to Bintray update notifications

4 years agoSite: Change the download URL to GitHub
Florian Zschocke [Mon, 27 Jan 2020 19:34:20 +0000 (20:34 +0100)]
Site: Change the download URL to GitHub

4 years agoSite: Remove Google Plus id
Florian Zschocke [Mon, 27 Jan 2020 19:31:21 +0000 (20:31 +0100)]
Site: Remove Google Plus id

Google Plus is gone, so linking to it makes no sense anymore.

4 years agoAdd project property `release.tag` as a global `project.tag`
Florian Zschocke [Mon, 27 Jan 2020 19:30:44 +0000 (20:30 +0100)]
Add project property `release.tag` as a global `project.tag`

Add property `release.tag` to keep a generally available property.
The `project.tag` was getting used in many places, so I need a global
definition for it. The property `project.tag`, defined in the target
`tagRelease` could not be reused, since when that target runs, the
version is still a SNAPSHOT version. (And properties don't get
re-assigned.) So instead a new property `release.tag` is defined,
just like `release.name`, which can be only used sensible in a
release stage, i.e. after `tagRelease` ran.

4 years agoUpdate the gh-pages branch
Florian Zschocke [Sun, 26 Jan 2020 19:46:43 +0000 (20:46 +0100)]
Update the gh-pages branch

The site was generated, but updating the gh-pages branch was included
in the `publishSite` target. So a new target is added and called,
`updateSite`.

4 years agoAdjust `release.template` for publishing releases on GitHub
Florian Zschocke [Sun, 26 Jan 2020 18:50:58 +0000 (19:50 +0100)]
Adjust `release.template` for publishing releases on GitHub

The major change is switching from `publishBinaries`, which still
exists and uploads to Bintray, to `releaseBinaries`, which creates
a draft release on GitHub and uploads the binaries.

Another change is some reordering. Now first the binaries are
uploaded, the maven artifacts pubished and the tag and site pages
pushed. Then the GitHub release is made public.
Only after that is the minor version bumped and pushed.

The whole script could use some error checking and stoping when
things go wrong, instead of blindly continuing.

A minor change, and temporary, is that we need and check for Ant 1.9,
as we still build with Java 7.

4 years agoAdd deployment of a release to GitHub
Florian Zschocke [Sun, 26 Jan 2020 15:47:44 +0000 (16:47 +0100)]
Add deployment of a release to GitHub

Add Ant tasks and macros to deploy binaries to GitHub,
using GitHub's releases.

Adds an Awk script to extract GH flavoured markdown release notes
from the release.moxie file.

Adds `ok.sh` to the repository so that it is readily available.
This is a Bourne shell GitHub API client, used to create a release
on GitHub and upload the binaries.

4 years agoChange single quotes to back ticks for formatting
Florian Zschocke [Sun, 26 Jan 2020 15:31:49 +0000 (16:31 +0100)]
Change single quotes to back ticks for formatting

4 years agoRun build and tests on Java 7.
Florian Zschocke [Sat, 11 Jan 2020 16:36:00 +0000 (17:36 +0100)]
Run build and tests on Java 7.

4 years agoMerge branch 'ci' into master
Florian Zschocke [Fri, 10 Jan 2020 23:10:00 +0000 (00:10 +0100)]
Merge branch 'ci' into master

Now we can also build on GitHub

ci ignore

4 years agoci: Ignore release and gh-pages branches for CI build on push
Florian Zschocke [Fri, 10 Jan 2020 23:04:03 +0000 (00:04 +0100)]
ci: Ignore release and gh-pages branches for CI build on push

4 years agoci: Add build with Java 7 on Linux
Florian Zschocke [Fri, 10 Jan 2020 22:24:08 +0000 (23:24 +0100)]
ci: Add build with Java 7 on Linux

Add a job to run a build with Java 7.
The job currently only runs on Linux.
In order to run on Java 7, an old Ant version is downloaded and
installed. We use moxie+ant for this, so we build with moxie.

4 years agoBuild on matrix of latest Ubunutu and latest Windows.
Florian Zschocke [Sun, 5 Jan 2020 21:03:34 +0000 (22:03 +0100)]
Build on matrix of latest Ubunutu and latest Windows.

Currently that is Ubuntu 18.04 and Windows Server 2019.
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners

4 years agoBuild as matrix of Java 8 and 11, only.
Florian Zschocke [Sun, 5 Jan 2020 20:53:36 +0000 (21:53 +0100)]
Build as matrix of Java 8 and 11, only.

We cannot build with Ant on GitHub since the provided Ant
version does not run on Java 7.

4 years agoBuild with matrix of Java 7, 8 and 11.
Florian Zschocke [Sun, 5 Jan 2020 20:21:48 +0000 (21:21 +0100)]
Build with matrix of Java 7, 8 and 11.

4 years agoAdd ci workflow to build on every push.
Florian Zschocke [Sun, 5 Jan 2020 20:07:50 +0000 (21:07 +0100)]
Add ci workflow to build on every push.

4 years agoUpdate JGit to versoin 4.5.7.201904151645-r
Florian Zschocke [Wed, 20 Nov 2019 20:35:17 +0000 (21:35 +0100)]
Update JGit to versoin 4.5.7.201904151645-r

4 years agoCorrect issue in FAQ page to link to GitHub issue.
Florian Zschocke [Mon, 18 Nov 2019 19:31:34 +0000 (20:31 +0100)]
Correct issue in FAQ page to link to GitHub issue.

4 years agoAdd dependency javax.activation to WAR, manager and fedclient, too.
Florian Zschocke [Mon, 18 Nov 2019 19:12:04 +0000 (20:12 +0100)]
Add dependency javax.activation to WAR, manager and fedclient, too.

I actually don't know if it is needed for the manager and fedclient,
but right now I'm going with better safe than sorry.

4 years agoAdd pattern to create links to GitHub commits from release notes etc.
Florian Zschocke [Sun, 17 Nov 2019 13:29:09 +0000 (14:29 +0100)]
Add pattern to create links to GitHub commits from release notes etc.

4 years agoChange issue links in release history to point to correct GitHub issues
Florian Zschocke [Sun, 17 Nov 2019 13:28:18 +0000 (14:28 +0100)]
Change issue links in release history to point to correct GitHub issues

4 years agoUpdate release notes
Florian Zschocke [Sun, 17 Nov 2019 13:21:45 +0000 (14:21 +0100)]
Update release notes

4 years agoUpdate release notes
Florian Zschocke [Sat, 16 Nov 2019 18:03:23 +0000 (19:03 +0100)]
Update release notes

4 years agoAdjust versions of JaCoCo and parboiled to match and work.
Florian Zschocke [Mon, 11 Nov 2019 22:45:56 +0000 (23:45 +0100)]
Adjust versions of JaCoCo and parboiled to match and work.

Adjust the version of JaCoCo down to 0.8.4 and the version
of parboiled-java up to 1.3.1. They need to match because both
use ASM. This combination has the same dependency on ASM: 7.1.

And it seems to work, at least the docs get generated and the
`moxie test` doesn't fail building the report anymore.

4 years agoUpdate test file with MD hashed password
Florian Zschocke [Mon, 11 Nov 2019 21:03:32 +0000 (22:03 +0100)]
Update test file with MD hashed password

With the feature of passwords getting automatically
upgraded to a hashed version, the default `admin`
password in the test-users file will get stored
as MD5 hashed during test execution. Commit this
change, so that the file isn't always showing up
as changed.

4 years agoSet .classpath back to moxie generated version.
Florian Zschocke [Mon, 11 Nov 2019 21:01:31 +0000 (22:01 +0100)]
Set .classpath back to moxie generated version.

4 years agoUpdate JaCoCo to version 0.8.5 to work when run under Java 11.
Florian Zschocke [Mon, 11 Nov 2019 20:59:55 +0000 (21:59 +0100)]
Update JaCoCo to version 0.8.5 to work when run under Java 11.

Running `moxie test` will crash under Java 11 with JaCoCo 0.7.8.

4 years agoMerge pull request #1324 from fzs/fix-prefLocale-docsNPE
Florian Zschocke [Mon, 11 Nov 2019 17:30:50 +0000 (18:30 +0100)]
Merge pull request #1324 from fzs/fix-prefLocale-docsNPE

Two fixes: broken links to docs and preferred language selection

4 years agoFix user preferences selecting the wrong preferred locale. 1324/head
Florian Zschocke [Mon, 11 Nov 2019 17:13:11 +0000 (18:13 +0100)]
Fix user preferences selecting the wrong preferred locale.

Due to a wrong comparison, when loading the preferred locale in the
user preferences page, in cases like `zh_CN` or `de_DE` the wrong
locale would be chosen.

As with too many things, the code is duplicated on the `UserPage`
and the `EditUserPage`. And they differ. So extract the choosing of
the preferred language for display into a method in the (more up-to-date)
`UserPage` and call that from the `EditUserPage`.

4 years agoGuard docs pages against bad URLs
Florian Zschocke [Mon, 11 Nov 2019 15:24:45 +0000 (16:24 +0100)]
Guard docs pages against bad URLs

If, for example, an external site links to a docs page or a specific
doc page, and the branch that link points to is no longer existing,
an internal error happens due to a NPE.

The NPE is guarded against and a No Docs page is returned.

4 years agoAdd `clone.bundle` as known command, but reject it as not implemented. 1323/head
Florian Zschocke [Sun, 10 Nov 2019 23:33:02 +0000 (00:33 +0100)]
Add `clone.bundle` as known command, but reject it as not implemented.

4 years agoFix NPE when no action can be parsed from the URL
Florian Zschocke [Sun, 10 Nov 2019 23:10:43 +0000 (00:10 +0100)]
Fix NPE when no action can be parsed from the URL

Renames `static final` variables according to convention to be in all
upper case. That makes it easier to see that in an `equals` comparison
the final variable should come first as it will not trigger a NPE.

Also strip parameters from the URL when extracting the repository
name from it. Parameters can not be part of a repository name, and
this way an empty repository name can be detected.

Fixes #1092

4 years ago:book: Fix link to LDAP sample data LDIF file in setup.
Florian Zschocke [Sun, 10 Nov 2019 17:37:13 +0000 (18:37 +0100)]
:book: Fix link to LDAP sample data LDIF file in setup.

4 years agoIn SSH tests ignore an external SSH tool
Florian Zschocke [Sun, 10 Nov 2019 12:04:29 +0000 (13:04 +0100)]
In SSH tests ignore an external SSH tool

The SshDaemonTest would fail under Windows. That is because JGit looks
at the `GIT_SSH` environment variable. If it is set, the tool the variable
is pointing to is used for the SSH connection. This is a problem when
it is set to "Plink" under Windows, because Plink will not recognize the
server key and will not find it in the registry, cached as a known host.
Since a test can/should not add the key to the registry but simply wants
to ignore it, but there is no way to tell Plink to do so, the tests would
fail.

This patch filters the `GIT_SSH` environment variable from JGit's
`SystemReader`, so that the internal SSH client is used.

4 years agoMerge pull request #1322 from fzs/sshd_update
Florian Zschocke [Sun, 10 Nov 2019 16:56:56 +0000 (17:56 +0100)]
Merge pull request #1322 from fzs/sshd_update

Update dependencies MINA to 2.0.21 and SSHD to 1.2.0

Update SSHD to fix an issue with hmac-sha2-512. This resolves problems with clients that prefer SHA-512 over SHA-256.

This also updates the dependency on SLF4J to the latest version, as the updated dependency on MINA did also bring in higher SLF4J versions.

4 years agoUpdate SLF4J dependency to latest version 1.7.29. 1322/head
Florian Zschocke [Fri, 8 Nov 2019 18:48:05 +0000 (19:48 +0100)]
Update SLF4J dependency to latest version 1.7.29.

4 years agoUpdate SSHD dependency to version 1.2.0.
Florian Zschocke [Fri, 8 Nov 2019 18:19:54 +0000 (19:19 +0100)]
Update SSHD dependency to version 1.2.0.

4 years agoUpdate SSHD dependency to version 1.1.0.
Florian Zschocke [Fri, 8 Nov 2019 16:26:06 +0000 (17:26 +0100)]
Update SSHD dependency to version 1.1.0.

4 years agoUpdate MINA to version 2.0.21.
Florian Zschocke [Fri, 8 Nov 2019 13:55:07 +0000 (14:55 +0100)]
Update MINA to version 2.0.21.

This includes a fix in MINA to a CVE.

4 years agoUpdate BouncyCastle dependency to version 1.57
Florian Zschocke [Sun, 10 Nov 2019 12:02:07 +0000 (13:02 +0100)]
Update BouncyCastle dependency to version 1.57

To support the new PBKDF2 password hashing, the Bouncy Castle provider
needs to be updated to a version that supports PBKDF2 with HMAC SHA265.
The current version doesn't have PBKDF2WithHmacSHA265, and neither does
Java 7, so that under Java 7 it can not be used. This update enables
the new password hashing under Java 7, too.

4 years agoIgnore the `RedisTicketService` tests until they are fixed.
Florian Zschocke [Sun, 10 Nov 2019 12:00:12 +0000 (13:00 +0100)]
Ignore the `RedisTicketService` tests until they are fixed.

Currently the tests cannot run as no Redis is available. Needs to be
fixed at some time.

4 years agoRemove Launcher from Manager and Federation Client.
Florian Zschocke [Fri, 8 Nov 2019 10:27:51 +0000 (11:27 +0100)]
Remove Launcher from Manager and Federation Client.

They will need to be called with the classpath and main class now,
instead of simply using the Jar.

4 years agoMerge pull request #1266 from pingunaut/1262_java9
Florian Zschocke [Thu, 7 Nov 2019 22:55:13 +0000 (23:55 +0100)]
Merge pull request #1266 from pingunaut/1262_java9

Added javax.activation dependency

4 years agoFix NullpointerException when stopping GitBlit Server.
Florian Zschocke [Thu, 7 Nov 2019 22:35:06 +0000 (23:35 +0100)]
Fix NullpointerException when stopping GitBlit Server.

When GitBlit server did not start properly, is running but couldn't
start the `PluginManager`, then stopping the server via the `--stop`
argument on the command line resulted in a NullpointerException.
Which left the server running. Now this is prevented and the server
will actually shut down.

4 years agoFor Java 9+ define the classpath instead of using a Launcher.
Florian Zschocke [Thu, 7 Nov 2019 19:00:17 +0000 (20:00 +0100)]
For Java 9+ define the classpath instead of using a Launcher.

The (moxie and other) Launcher do not work with Java 9 and later anymore.
It used to dynamically extend the classpath, misusing an internal
interface of the `URLClassLoader`. This is no longer possible since Java 9,
which closed that path and does not offer any way to dynamically extend
the classpath during runtime.

So the choice is between providing one large Jar with everything in it,
providing a Jar that has the Jars in `ext` listed explicitly in its
manifest, and specifying the classpath on the command line where
the `ext` directory can be added and all contained jar files will
be put on the classpath.

The motivation for the Launcher class was to be able to simply drop
new jar files into a directory and they will be picked up at the
application start, without having to specify a classpath. We opt
for solution three here. This way jar files can still be dropped
into the ext directory, albeit the directory needs to be added to
the classpath on the command line. Unfortunately using a wildcard
is not possible in the manifest file. We change the calls in the
script files accordingly. This seems like a good compromise,
since no one will run the application manually typing the whole
commandline anyway.

This also does away with the splash screen, by the way. Again,
doesn't seem like a big loss, as I don't think it was ever shown
for the Authority.

Personally, I am not convinced that it is the best way, because
I don't really think that the use case of dropping whatever jar
files into the `ext` directory is a valid one that happened a lot.

This does not yet fix the client programs, which still use a
Launcher. Maybe for them a all-in-one Jar is a better solution.

Fixes #1262
Fixes #1294

4 years agoReport Java versions used during build and server start.
Florian Zschocke [Thu, 7 Nov 2019 18:54:41 +0000 (19:54 +0100)]
Report Java versions used during build and server start.

With three versions about to be supported right now
it is getting more important to know which Java version is
used when building and testing Gitblit, and which Java
version is used to run Gitblit.

So have the Moxie build report the javac version, and the
JVM version that Moxie is running on. These might be
different.
The `GitBlitServer` will print the Java version and vendor,
so that it gets visible if a user would paste a log output
for analysis.

4 years agoUpdate to recommended com.sun.activation package. 1266/head
Florian Zschocke [Thu, 7 Nov 2019 14:28:21 +0000 (15:28 +0100)]
Update to recommended com.sun.activation package.

Update the dependency to the recommended JAF stand-alone
com.sun.activation:javax.activation:1.2.0

4 years agoSetup build matrix for OpenJDK 8, 9 and 11 on Circle CI
Florian Zschocke [Wed, 6 Nov 2019 15:20:27 +0000 (16:20 +0100)]
Setup build matrix for OpenJDK 8, 9 and 11 on Circle CI

4 years agoTravis: Build and test on JDK 7, 8 and 11.
Florian Zschocke [Wed, 6 Nov 2019 13:44:00 +0000 (14:44 +0100)]
Travis: Build and test on JDK 7, 8 and 11.

This uses the Trusty (14.04) image since that in the only one
where all three JDKs are available.

4 years agoMerge branch 'pingunaut-1166_more_secure_password_hashes' into master.
Florian Zschocke [Wed, 6 Nov 2019 11:39:55 +0000 (12:39 +0100)]
Merge branch 'pingunaut-1166_more_secure_password_hashes' into master.

4 years agoAdd more PasswordHash tests with strings beyond iso-8859-1.
Florian Zschocke [Wed, 6 Nov 2019 11:35:31 +0000 (12:35 +0100)]
Add more PasswordHash tests with strings beyond iso-8859-1.

4 years agoUse the new PasswordHash classes.
Florian Zschocke [Tue, 5 Nov 2019 21:26:11 +0000 (22:26 +0100)]
Use the new PasswordHash classes.

Integrate the `PasswordHash` class and subclass in the user
and password editing and authentication. Replaces the old code and
the previous `SecurePasswordHashingUtils` class.

4 years agoAdd support for PBKDF2 to PasswordHash
Florian Zschocke [Tue, 5 Nov 2019 12:43:06 +0000 (13:43 +0100)]
Add support for PBKDF2 to PasswordHash

Integrate the work of pingunaut to add support for PBKDF2 password
hashing. A new class `PasswordHashPbkdf2` is added, which builds
on his `SecurePasswordHashUtils` class, but makes it a subclass
of `PasswordHash`. This will replace the original class when
integrating the new PasswordHash way into GitBlit.

4 years agoAdd a PasswordHash class as a central place to deal with password hashes.
Florian Zschocke [Tue, 5 Nov 2019 12:06:07 +0000 (13:06 +0100)]
Add a PasswordHash class as a central place to deal with password hashes.

Instead of having to deal with the implementation details of hashing
and verifying passwords in multiple places, have a central unit
be responsible for it. Otherwise we need to edit three different places
when adding a new hashing scheme.
With this class adding a new hashing scheme just requires creating a
new subclass of `PasswordHash` and registering its type in the enum
`PasswordHash.Type`.
The rest of the code will use a common interface for all hashing
schemes and doesn't need to be changed when a new one is added.

5 years agoencoded email's sender name with utf-8.
william [Thu, 2 Mar 2017 06:06:22 +0000 (14:06 +0800)]
encoded email's sender name with utf-8.

5 years agoSet default to `expanded` for collapsible repo groups.
Florian Zschocke [Sat, 15 Jun 2019 19:37:07 +0000 (21:37 +0200)]
Set default to `expanded` for collapsible repo groups.

Move the new property `web.collapsibleRepositoryGroups` into the
`web` section, close to the list type property. Set the default
to be `expanded`, so that the new feature is visible but the list
is still the full list like before.

Add new value `tree` to the description of the property
`web.repositoryListType`.

5 years agoRemove "folding outlines" and sort repositories before subfolders.
Florian Zschocke [Sat, 15 Jun 2019 19:09:36 +0000 (21:09 +0200)]
Remove "folding outlines" and sort repositories before subfolders.

Remove guard rails at the left to get a cleaner look.
To make it easier to determine which repositories belong to which
folder, display the repositories first, then the subfolder.

Decreased indentation a little.

5 years agoAdd support nested groups on the Repositories page
Florian Zschocke [Sat, 15 Jun 2019 12:34:29 +0000 (14:34 +0200)]
Add support nested groups on the Repositories page

Fix for #725.
Also covers #527.

This is a squashed commit of the following commits,
merging and closing pull request #1267:

commit 55fee41769ffab1aff59344fe117d481687aa743
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Mon Nov 6 17:19:53 2017 +0100

    declared local variable final to fix travis build

commit 131e4d14a48c2a3fdce621fa54637de50684d040
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Mon Nov 6 14:11:55 2017 +0100

    fix formatting (use tab for identation)

commit 8da5f6d5967894f157251c320928acdab3a451e7
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Mon Nov 6 13:45:39 2017 +0100

    Add repositoryListType tree. Addresses #725, 527 and includes #1224

commit 6c061651fb95212ae242dbca06c8d9ef80146201
Merge: f365daa3 40ee9653
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Sat Nov 4 13:19:08 2017 +0100

    Merge remote-tracking branch 'collapsible/ticket/527' into 725_nested_repos

commit f365daa3b1d6be135365f9b11bdece320beabf4e
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Sat Nov 4 13:10:24 2017 +0100

    first working version of tree model

5 years agocollapsible group repositories
ybosy [Fri, 7 Apr 2017 08:46:35 +0000 (10:46 +0200)]
collapsible group repositories

5 years agoAdd build dependency on parboiled to fix build of documentation.
Florian Zschocke [Thu, 13 Jun 2019 19:03:32 +0000 (21:03 +0200)]
Add build dependency on parboiled to fix build of documentation.

Updating JaCoCo in commit 23072ffb broke the build of the
HTML documentation. As found out by @chirontt, adding parboiled
as a build dependency fixes it.

Fixes #1220 and closes #1313

5 years agoEscape folder names in JGitUtils to allow special characters. Fixes #999
Martin Spielmann [Sat, 28 Jan 2017 14:24:57 +0000 (15:24 +0100)]
Escape folder names in JGitUtils to allow special characters. Fixes #999

5 years agoFix revLog test that broke due to changes in the hello-world repository.
Florian Zschocke [Mon, 10 Jun 2019 20:11:35 +0000 (22:11 +0200)]
Fix revLog test that broke due to changes in the hello-world repository.

5 years agoCreate unit tests for special characters in path names
Florian Zschocke [Mon, 10 Jun 2019 19:32:02 +0000 (21:32 +0200)]
Create unit tests for special characters in path names

Create a regression test for issue #999.
Add directories with '[]' ans '()' in the name to the
hello-world repository, so that they can be used in unit
tests for repository paths with special characters.

5 years agoNull-safe compare for ticket milestones without due date
Fritz Schrogl [Sun, 18 Feb 2018 15:21:33 +0000 (16:21 +0100)]
Null-safe compare for ticket milestones without due date

5 years agoDo not resolve symbolic links to repositories.
Florian Zschocke [Mon, 10 Jun 2019 14:37:15 +0000 (16:37 +0200)]
Do not resolve symbolic links to repositories.

When symbolic links under the base repository folder point to repositories
outside the base repository folder, the forming of relative repository
names failed and resulted in NullPointerExceptions.

Create the relative path by not following symbolic links, i.e. the link
name is taken as is and not resolved to the external path.

This also changes the whole `exactPath` method to work on Paths, instead
of Files.

Fixes #891 and fixes #837.

5 years agoMerge branch 'chirontt-external_repos_zipped' into master.
Florian Zschocke [Fri, 7 Jun 2019 20:43:51 +0000 (22:43 +0200)]
Merge branch 'chirontt-external_repos_zipped' into master.

5 years agoZips of recreated hello-world.git and all external repositories for testing.
chirontt [Sat, 27 Apr 2019 18:51:26 +0000 (14:51 -0400)]
Zips of recreated hello-world.git and all external repositories for testing.

This hello-world.git repo is created using the native Git for Windows
software.

Various test classes in the GitBlitSuite test suite require the presence
of the hello-world.git repo in github.com/git/ which has been missing,
hence causing many test failures in the suite. This recreation of the
hello-world.git repo aims to conform to the many test cases'
requirements in the suite, and to be checked in as part of the gitblit
repo, thus eliminates the requirement of a remote hello-world.git repo
during the test run. The repo is now stored is a zip ball in the new
src/test/data folder.

The hello-world repo's various commit IDs were hard-coded in various
test classes. These commit IDs, which must now have new values in the
recreated repo, are now extracted out to the
src/test/data/hello-world.properties file. The gitblit's build.xml is
modified to generate the HelloworldKeys.java file containing the
hello-world.properties file's key strings, in similar fashion as the
existing generation of the com.gitblit.Keys.java file. And these key
strings in HelloworldKeys.java are now used in the various test classes,
thus eliminating the hard-coding of the hello-world repo's commit IDs in
the test code.

During the test run by GitBlitSuite test suite, some repos from GitHub
were cloned and became part of the test data. These repos are now zipped
to be part of gitblit repo itself, thus eliminating the network fetch at
the start of test run which can be slow, especially with the JGit repo
cloning which is huge and time consuming. The cloned JGit repo is now
zipped and checked in to gitblit, along with the other 4 repos
(hello-world, ambition, gitective and ticgit). They will be unzipped
during the test suite run and be available in the local file system,
thus avoiding the need for some network fetch.

Special note on the zipped JGit repo: this repo is big (and growing all
the time on GitHub), and takes up about 32MB of disk space after cloning
from GitHub. I've made it smaller by resetting HEAD back to a commit of
5 years ago (with git reset --hard <commitId> command), to put it back
to roughly where/when the tests were written for it (which is not quite,
because there are tons of commit history since which can't be removed.)
The local JGit repo is then garbage-collected (with git gc --prune
--aggressive) to reduce its size to about 19MB.

Zipped it is still 17MB. This is a lot of MBs for a few tests.
So the JGit repo is not included in this commit.

Fixes #1275

5 years agoFix for various test failures.
chirontt [Sun, 28 Apr 2019 19:51:21 +0000 (15:51 -0400)]
Fix for various test failures.

Most of failures were due to temporary test repos, users and/or teams
being left behind after the test run, and these left-over stuff in
$baseFolder/data/git caused assertion errors in many tests in subsequent
test runs. This fix tries to delete those left-over stuff at the end of
each test, mainly in their @Afterclass code blocks.

PushLogTest.java is deleted as it doesn't work, and has been superseded
with better tests in various protocol test suites (GitServletTest,
GitDaemonTest, SshDaemonTest, etc.)

5 years agoMigrate to Circle CI version 2
Florian Zschocke [Thu, 6 Jun 2019 13:28:16 +0000 (15:28 +0200)]
Migrate to Circle CI version 2

The new Circle CI requires a completely different configuration.

6 years agoAdded javax.activation dependency "
Martin Spielmann [Fri, 3 Nov 2017 21:43:34 +0000 (22:43 +0100)]
Added javax.activation dependency "
thanks to this dependency, one can start gitblit with java 9 without using deprecated internal module --add-modules java.activation

7 years agoMerge pull request #1243 from sebastianopilla/master
James Moger [Mon, 5 Jun 2017 11:30:35 +0000 (04:30 -0700)]
Merge pull request #1243 from sebastianopilla/master

Fixes the 30 seconds timeout when cloning over HTTP