summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/RawPage.java
Commit message (Collapse)AuthorAgeFilesLines
* Issue #1011: do not serialize JGit commit objectsTom2021-11-031-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit commit objects are a recursive data structure; they have links to their parent commits. Serializing a JGit commit will try to recursively serialize all reachable ancestors as faras they have been loaded. If that ancestor chain is too long, a StackOverflowError is thrown during Wicket's page serialization if a page has a reference to sucha JGit commit. Fixed by making sure that pages o not contain references to JGit commits. Use the (existing) wrapper object RepositoryCommit instead. * RepositoryCommit has a transient reference to the JGit commit and reads the commit from the repository upon de-serialization. * RefModel is a similar case (JGit tags/branches may also have links to the commits they point to). Solved a bit differently by making it a pure data object by transferring the interesting data from the JGit object in the constructor. * Change DataViews instantiated with RevCommit to use RepositoryCommit instead. * Change inner anonymous DataViews to ensure they do not have a synthesized field referencing the "allRefs" map. Such a synthesized field would also get serialized, and then serialize JGit commits again. Finally, remove non-transient logger instances in Wicket classes. Those might lead to NotSerializableException. These StackOverflowErrors have been reported in several places since 2014: * https://groups.google.com/forum/#!topic/gitblit/GH1d8WSlR6Q * https://bugs.chromium.org/p/gerrit/issues/detail?id=3316 * https://groups.google.com/d/msg/repo-discuss/Kcl0JIGNiGk/0DjH4mO8hA8J * https://groups.google.com/d/msg/repo-discuss/0_P6A3fjTec/2kcpVPIUAQAJ * https://github.com/gitblit/gitblit/issues/1011 * https://github.com/tomaswolf/gerrit-gitblit-plugin/issues/21
* Improve logging granularity of raw page missing commit, object, or blobJames Moger2014-02-281-13/+21
|
* Improve raw page failure to find specified fileJames Moger2014-02-281-0/+28
| | | | Change-Id: I9063a259d46cd164148ba5fea6c9c78684370fa2
* Eliminate nearly all direct GitBlit singleton references in WicketJames Moger2013-11-261-6/+5
| | | | | | | | | | This is the first step towards modularization and injection. All direct references to the GitBlit singleton within the Wicket pages and panels have been replaced to proxy methods in the GitBlitWebApp singleton. There are still two Wicket classes which rely on the GitBlit singleton; those require manual instantiation (servlet 3). Change-Id: I0cdbbcf87959d590c446c99abb09c07c87c737bc
* Fix raw page binary content type when running behind reverse proxyJames Moger2013-10-161-5/+20
| | | | Change-Id: I9f613114b2bb4c1dacae6e67c7673149a0476cf1
* Trim trailing whitespace and organize importsJames Moger2013-09-301-6/+6
| | | | Change-Id: I9f91138b20219be6e3c4b28251487df262bff6cc
* apply PageParameters(final Map<String, ?> parameterMap), encode filename of ↵guriguri2013-08-011-2/+24
| | | | Content-Disposition
* Enforce security on raw blob page (issue 198)James Moger2013-03-291-4/+16
|
* Reorganized to Apache Standard Directory Layout & integrated MoxieJames Moger2013-03-271-0/+161
This is a massive commit which reorganizes the entire project structure (although it is still monolithic), removes the Build classes, and switches to Moxie, a smarter Ant build tookit based on the original Gitblit Build classes. The Ant build script will likely require additional fine-tuning, but this is big step forward.