]> source.dussan.org Git - gitblit.git/commit
raw: Fix getPath with trailing slash that was escaped
authorFlorian Zschocke <f.zschocke+git@gmail.com>
Mon, 9 Nov 2020 19:27:31 +0000 (20:27 +0100)
committerFlorian Zschocke <f.zschocke+git@gmail.com>
Mon, 9 Nov 2020 23:02:53 +0000 (00:02 +0100)
commit3212dc014c445425cc09f8d92065f1afb4e53065
tree73413419bbe4c892257af8407755f1d079e92f99
parent1570199d3fc21c26b1c2a6603b9dc24317176b3f
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.
src/main/java/com/gitblit/servlet/RawServlet.java