summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/servlet
Commit message (Collapse)AuthorAgeFilesLines
* Fix single quotes in MessageFormat patterns.Egor Shchegolkov2023-10-141-1/+1
|
* raw: URL encode the links to raw view of filesFlorian Zschocke2021-10-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
* raw: Fix raw links to branches with a slash in their nameFlorian Zschocke2020-11-101-6/+11
| | | | | | | | | 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-092-15/+42
| | | | | | | | | | | 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-091-1/+4
|
* raw: Strip leading and trailing slash from repo and path names for linkFlorian Zschocke2020-11-091-0/+9
| | | | | | 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.
* Add `clone.bundle` as known command, but reject it as not implemented.Florian Zschocke2019-11-112-2/+19
|
* Fix NPE when no action can be parsed from the URLFlorian Zschocke2019-11-112-30/+45
| | | | | | | | | | | | 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
* 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.
* List branches from only one repository if a repository name is givenMarkus Fömpe2017-01-261-0/+4
| | | | | | e.g.: https://localhost:8443/rpc/?req=LIST_REPOSITORY_BRANCHES&name=repo.git Fix #1184
* Merge pull request #988 from gitblit/976-raw-download-filestore-itemJames Moger2016-01-255-16/+30
|\ | | | | Fix for #976 - Filestore links via browser
| * Fix for #976 - Filestore links via browserPaul Martin2015-12-255-16/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | + GitLFS client support + FilestoreModel now parses meta file + Read meta heading from cache if available + Authentication based on accept headers for browser view filestore login + PathModel & PathChangeModel now understands filestore items + Zip & Rar downloads contain include filestore items + Filestore servlet returns LFS JSON error only if accepted by client + DiffStat now knows repository to allow identification of filestore items + Filestore items identified and returned via view, raw & blob links on blame, commitDiff, commit and Tree pages
* | Fix for #993 LIST_BRANCHES without adminBoris Stumm2016-01-061-13/+2
|/ | | | | Replaced the canAccess() method in RpcFilter with !adminRequest, that should solve the problem.
* Merge pull request #981 from mrjoel/mrjoel-loguseraccessJames Moger2015-12-101-2/+2
|\ | | | | Log username with access logging
| * log authenticated usernameJoel Johnson2015-12-091-2/+2
| |
* | revise logic for forcing dotfile to textJoel Johnson2015-12-091-1/+8
|/
* Merge pull request #969 from paulsputer/968-GitLFS-Extract-URI-From-RepositoryJames Moger2015-12-031-1/+1
|\ | | | | fix for #968 extracting repository from URI
| * fix for #968 extracting repository from URIPaul Martin2015-12-031-1/+1
| | | | | | | | + Allows using lfs when `server.contextPath = /git`
* | Handle possible NPE when extracting WAR resources into a new directoryJames Moger2015-11-251-1/+7
| |
* | Raw servlet now assumes text/plain for dot filesJames Moger2015-11-231-1/+1
| |
* | Match longest repository path towards the shortest pr-950paladox2015-11-231-15/+6
|/ | | | This was originally from https://github.com/gitblit/gitblit/pull/950 but seems to have been reverted when develop branch was merged with master.
* Git-LFS supportPaul Martin2015-10-106-20/+623
| | | | | | | | | | | | | | + Metadata maintained in append-only JSON file providing complete audit history. + Filestore menu item + Lists filestore items + Current size and availability + Link to GitBlit Filestore help page (top right) + Hooks into existing repository permissions + Uses default repository path for out-of-box operation with Git-LFS client + accessRestrictionFilter now has access to http method and auth header + Testing for servlet and manager
* Fixes #922: RSS feed link ignores forward-slash characterJames Moger2015-09-281-3/+3
|
* Renamed ssh.Display(Host|Port) to ssh.Advertised(Host|Port)James Moger2015-06-151-4/+4
|
* Added git.sshDisplay{Port|Host} to hide port forward.Morten Bøgeskov2015-06-151-1/+7
| | | | | | Running gitblit in a container it's easy to expose the ssh on the default port. Using git.sshDisplayPort/git.sshDisplayHost you can expose the forwarded address as the official location.
* Bump to JGit 4.0.0Luca Milanesio2015-06-121-1/+1
| | | | | JGit 4.0.0 fixes a memory leak but introduces a non-compatible change for closing the RevWalk: before it was release() but now is close()
* Fix html raw content type servingJames Moger2015-05-221-9/+18
|
* Remove /org/ filteringJames Moger2015-05-211-1/+1
|
* Deny access to /com and /org folders in GO setupJean-Baptiste Mayer2015-04-142-1/+64
| | | | | Added a servlet to serve "Access Denied" Added conditional mapping of /com and /org folders in the web setup
* Use startManager(X) from startManager(Injector, Class)James Moger2014-12-031-3/+1
|
* Allows starting an already instantiated managerLuca Milanesio2014-11-291-0/+6
| | | | | | When a manager is injected through other means, (e.g. using a different GuiceModule and injector in Gerrit) we need a way to start it without having to necessarily passing through the injection process again.
* Ensure that pretty-printed files are served as text/plain in Raw servletJames Moger2014-11-241-3/+12
|
* Extract WAR data resources if they do not exist in ${baseFolder}James Moger2014-11-241-4/+2
|
* Add support for image/svg+xml content type to raw servletJames Moger2014-11-191-3/+10
|
* Merge branch 'ticket/211' into developJames Moger2014-10-261-3/+2
|\
| * Fix raw servlet trashing paths with spacesJames Moger2014-10-261-3/+2
| |
* | Merge branch 'ticket/203' into developJames Moger2014-10-071-1/+1
|\|
| * Bug in the rawservlet in extracting the repository out of the path. TheRobbert Noordzij2014-10-071-1/+1
| | | | | | | | | | offset for finding the next slash should be the current slash + 1, not the last offset + the offset of the current slash.
* | Merge branch 'ticket/129' into developJames Moger2014-09-301-1/+1
|\|
| * Remove Wicket references from non-Wicket packagesJames Moger2014-09-301-1/+1
| |
* | Merge branch 'ticket/193' into developJames Moger2014-09-301-12/+27
|\|
| * Support GITBLIT_HOME as a system property and environment variableJames Moger2014-09-301-12/+27
| |
* | Allow authentication providers to control user and team role changesJames Moger2014-09-261-189/+190
| |
* | Merge branch 'ticket/185' into developJames Moger2014-09-241-3/+3
|\|
| * Fix GITBLIT_HOME environment variable baseFolder supportJames Moger2014-09-241-3/+3
| |
* | Merge branch 'ticket/169' into developJames Moger2014-09-084-8/+46
|\|
| * Improve bad request handling in branch graph, zip, & syndication servletsJames Moger2014-09-084-8/+46
| |
* | Merge branch 'ticket/161' into developJames Moger2014-09-081-1/+1
|\|