- Added beginnings of a plugin framework for extending Gitblit (issue-381, ticket-23)
- Added a French translation (pr-163)
- Added a setting to control what transports may be used for pushes
+ - Expose JGit 3.x receive pack settings (issue-408)
dependencyChanges:
- Java 7
- Jetty 9.1.4
- { name: 'realm.ldap.bindpattern', defaultValue: ' ' }
- { name: 'tickets.closeOnPushCommitMessageRegex', defaultValue: '(?:fixes|closes)[\\s-]+#?(\\d+)' }
- { name: 'git.acceptedPushTransports', defaultValue: ' ' }
+ - { name: 'git.checkReceivedObjects', defaultValue: 'true' }
+ - { name: 'git.checkReferencedObjectsAreReachable', defaultValue: 'true' }
+ - { name: 'git.maxObjectSizeLimit', defaultValue: '0' }
+ - { name: 'git.maxPackSizeLimit', defaultValue: '-1' }
- { name: 'git.sshPort', defaultValue: '29418' }
- { name: 'git.sshBindInterface', defaultValue: ' ' }
- { name: 'git.sshKeysManager', defaultValue: 'com.gitblit.transport.ssh.FileKeyManager' }
\r
# SSH backend NIO2|MINA.\r
#\r
+# The Apache Mina project recommends using the NIO2 backend.\r
+#\r
# SINCE 1.5.0\r
git.sshBackend = NIO2\r
\r
# RESTART REQUIRED\r
git.packedGitMmap = false\r
\r
+# Validate all received (pushed) objects are valid.\r
+#\r
+# SINCE 1.5.0\r
+git.checkReceivedObjects = true\r
+\r
+# Validate all referenced but not supplied objects are reachable.\r
+#\r
+# If enabled, Gitblit will verify that references to objects not contained\r
+# within the received pack are already reachable through at least one other\r
+# reference advertised to clients.\r
+#\r
+# This feature is useful when Gitblit doesn't trust the client to not provide a\r
+# forged SHA-1 reference to an object, in an attempt to access parts of the DAG\r
+# that they aren't allowed to see and which have been hidden from them via the\r
+# configured AdvertiseRefsHook or RefFilter.\r
+#\r
+# Enabling this feature may imply at least some, if not all, of the same functionality\r
+# performed by git.checkReceivedObjects. \r
+#\r
+# SINCE 1.5.0\r
+git.checkReferencedObjectsAreReachable = true\r
+\r
+# Set the maximum allowed Git object size.\r
+#\r
+# If an object is larger than the given size the pack-parsing will throw an exception\r
+# aborting the receive-pack operation. The default value, 0, disables maximum\r
+# object size checking.\r
+#\r
+# SINCE 1.5.0\r
+git.maxObjectSizeLimit = 0\r
+\r
+# Set the maximum allowed pack size.\r
+#\r
+# A pack exceeding this size will be rejected. The default value, -1, disables\r
+# maximum pack size checking.\r
+#\r
+# SINCE 1.5.0\r
+git.maxPackSizeLimit = -1\r
+\r
# Use the Gitblit patch receive pack for processing contributions and tickets.\r
# This allows the user to push a patch using the familiar Gerrit syntax:\r
#\r
setAllowDeletes(user.canDeleteRef(repository));\r
setAllowNonFastForwards(user.canRewindRef(repository));\r
\r
+ int maxObjectSz = settings.getInteger(Keys.git.maxObjectSizeLimit, -1);\r
+ if (maxObjectSz >= 0) {\r
+ setMaxObjectSizeLimit(maxObjectSz);\r
+ }\r
+ int maxPackSz = settings.getInteger(Keys.git.maxPackSizeLimit, -1);\r
+ if (maxPackSz >= 0) {\r
+ setMaxPackSizeLimit(maxPackSz);\r
+ }\r
+ setCheckReceivedObjects(settings.getBoolean(Keys.git.checkReceivedObjects, true));\r
+ setCheckReferencedObjectsAreReachable(settings.getBoolean(Keys.git.checkReferencedObjectsAreReachable, true));\r
+\r
// setup pre and post receive hook\r
setPreReceiveHook(this);\r
setPostReceiveHook(this);\r