| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
+ 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
|
| |
|
| |
|
|
|
|
| |
This was originally from https://github.com/gitblit/gitblit/pull/950 but seems to have been reverted when develop branch was merged with master.
|
|
|
|
|
| |
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()
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|\| |
|
| |
| |
| |
| |
| | |
offset for finding the next slash should be the current slash + 1, not
the last offset + the offset of the current slash.
|
|\| |
|
| | |
|
|\| |
|
| | |
|
|\| |
|
| | |
|
| |\
| | |
| | |
| | |
| | | |
Conflicts:
src/main/java/com/gitblit/servlet/RawServlet.java
|
| |\ \ |
|
| |\ \ \ |
|
|\ \ \ \ \
| | |_|_|/
| |/| | |
| | | | |
| | | | | |
Conflicts:
src/main/java/com/gitblit/servlet/RawServlet.java
|
| | | | | |
|
|\ \ \ \ \
| | |_|_|/
| |/| | | |
|
| |/ / / |
|
|\ \ \ \
| | |_|/
| |/| | |
|
| |/ / |
|
| | | |
|
| |/
|/| |
|
|/ |
|
| |
|
|
|