summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add this into the install/uninstall and reindex of the service tooZwixx2021-07-213-9/+13
| |
* | Use full path to Gitblit directory in batch scriptsZwixx2021-07-212-2/+9
| | | | | | | | | | | | | | | | 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.
* | Fix: Make CPU hog fix Java 7 compatibleFlorian Zschocke2021-07-141-7/+22
| | | | | | | | | | | | | | | | 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.
* | bugfix: fix CPU hog bug in config saveIngo Lafrenz2021-07-052-1/+173
| |
* | Update zh_CN translationYMNNs2021-05-031-269/+310
| | | | | | Updated simplified Chinese translation and added missing entries. This translation is now 100% completed.
* | docs: Change Ohloh link to Open HubFlorian Zschocke2020-11-231-1/+1
| | | | | | | | | | | | | | Ohloh got acquired by Synopsis and is nor Open Hub. Change the links for the tiny widget to point to Open Hub. Closes #1356
* | fix: Also parse exp links in MD pagesFlorian Zschocke2020-11-161-0/+8
| | | | | | | | | | | | Add a link parser also for `ExpLinks` because we need to escape paths to files in subfolders. This closes #1358
* | raw: Fix raw links to branches with a slash in their nameFlorian Zschocke2020-11-102-22/+27
| | | | | | | | | | | | | | | | | | 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.
* | raw: Fix getPath with trailing slash that was escapedFlorian Zschocke2020-11-101-3/+7
| | | | | | | | | | | | | | | | | | 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.
* | raw: Fix getPath with lead-ins or missing trailing slashes after the branch.Florian Zschocke2020-11-091-1/+14
| |
* | raw: Refactor RawServlet:getBranch and :getPath parametersFlorian Zschocke2020-11-093-59/+727
| | | | | | | | | | | | | | | | | | | | | | 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.
* | raw: Fix exceptions when no path info is given to raw servletFlorian Zschocke2020-11-092-2/+115
| |
* | raw: Strip leading and trailing slash from repo and path names for linkFlorian Zschocke2020-11-093-0/+696
| | | | | | | | | | | | 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.
* | Fix 1150: Use external link instead of internal wiki link for tickets_setupFlorian Zschocke2020-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add service scripts for FreeBSDDavid Hofmann2020-08-042-0/+51
| |
* | 📖docs: Add update of service scripts in upgrade GO documentationFlorian Zschocke2020-04-051-0/+22
| | | | | | | | Also: release notes.
* | 🏃 run: Fix Linux service scripts to use classpath and classFlorian Zschocke2020-04-053-9/+9
| | | | | | | | | | | | | | Update the service scripts to use `-cp` and specify the GitBlitServer class, instead of the `-jar` parameter. Fixes #1333
* | 🏃run: Use quotes around class path in scriptsFlorian Zschocke2020-04-055-5/+5
| | | | | | | | | | | | | | | | | | 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
* | Change tests in shell scripts to be more compatible with Bourne shellFlorian Zschocke2020-04-052-2/+2
| | | | | | | | | | This is needed for the scripts to work in Alpine Linux, which comes with a Bourne shell.
* | Delete password from memory in AuthenticationManagerFlorian Zschocke2020-04-054-31/+125
| | | | | | | | | | | | 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)`.
* | 🦟 fix: Password hash upgrade kills existing passwordsFlorian Zschocke2020-04-052-21/+38
| | | | | | | | | | | | | | | | | | | | 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
* | docu: Fix typoFlorian Zschocke2020-04-041-1/+1
| |
* | Add Twitter link to site overview and built-in docs.Florian Zschocke2020-01-271-0/+1
| |
* | Site: Remove link to Bintray update notificationsFlorian Zschocke2020-01-271-2/+1
| |
* | Add deployment of a release to GitHubFlorian Zschocke2020-01-271-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Correct issue in FAQ page to link to GitHub issue.Florian Zschocke2019-11-181-1/+1
| |
* | Update test file with MD hashed passwordFlorian Zschocke2019-11-111-1/+2
| | | | | | | | | | | | | | | | | | 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.
* | Fix user preferences selecting the wrong preferred locale.Florian Zschocke2019-11-112-46/+28
| | | | | | | | | | | | | | | | | | | | | | 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`.
* | Guard docs pages against bad URLsFlorian Zschocke2019-11-112-0/+9
| | | | | | | | | | | | | | | | 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.
* | Add `clone.bundle` as known command, but reject it as not implemented.Florian Zschocke2019-11-113-3/+32
| |
* | Fix NPE when no action can be parsed from the URLFlorian Zschocke2019-11-113-30/+99
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | :book: Fix link to LDAP sample data LDIF file in setup.Florian Zschocke2019-11-101-1/+1
| |
* | In SSH tests ignore an external SSH toolFlorian Zschocke2019-11-101-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Update SSHD dependency to version 1.2.0.Florian Zschocke2019-11-104-4/+18
| |
* | Update SSHD dependency to version 1.1.0.Florian Zschocke2019-11-105-13/+20
| |
* | Ignore the `RedisTicketService` tests until they are fixed.Florian Zschocke2019-11-101-0/+3
| | | | | | | | | | Currently the tests cannot run as no Redis is available. Needs to be fixed at some time.
* | Remove Launcher from Manager and Federation Client.Florian Zschocke2019-11-082-168/+3
| | | | | | | | | | They will need to be called with the classpath and main class now, instead of simply using the Jar.
* | Fix NullpointerException when stopping GitBlit Server.Florian Zschocke2019-11-071-5/+7
| | | | | | | | | | | | | | | | 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.
* | For Java 9+ define the classpath instead of using a Launcher.Florian Zschocke2019-11-0713-334/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Report Java versions used during build and server start.Florian Zschocke2019-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'pingunaut-1166_more_secure_password_hashes' into master.Florian Zschocke2019-11-0611-57/+1340
|\ \
| * | Add more PasswordHash tests with strings beyond iso-8859-1.Florian Zschocke2019-11-061-1/+31
| | |
| * | Use the new PasswordHash classes.Florian Zschocke2019-11-0512-374/+185
| | | | | | | | | | | | | | | | | | Integrate the `PasswordHash` class and subclass in the user and password editing and authentication. Replaces the old code and the previous `SecurePasswordHashingUtils` class.
| * | Add support for PBKDF2 to PasswordHashFlorian Zschocke2019-11-053-15/+507
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Add a PasswordHash class as a central place to deal with password hashes.Florian Zschocke2019-11-052-0/+640
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | fix commentMartin Spielmann2017-01-071-1/+1
| | |
| * | Replaced duplicated strings by using constantMartin Spielmann2017-01-072-4/+4
| | |
| * | Update AuthenticationManager to update weakly stored passwords on loginMartin Spielmann2017-01-073-10/+61
| | |
| * | Added possibility to use secure hashes to store passwordsMartin Spielmann2017-01-017-7/+266
| | | | | | | | | | | | Addresses #1166
* | | encoded email's sender name with utf-8.william2019-06-161-1/+1
| | |