Fix: User could get around restrictions by editing commit msg

The Gerrit server may enforce several restrictions on the
commit message (change-id needed, signed-off-by, etc).

The user could get around these restrictions by pushing a
commit and then editing the commit message using the UI.

Now the "Edit commit message"-feature is using the
validation code refactored out from ReceiveCommits, and
correct validation of the commit message is done before
Gerrit accepts the new commit.

Change-Id: I2fb13ddb1ea5aacf672101b1e4c1867543bd66e3
This commit is contained in:
Gustaf Lundh
2012-11-30 16:12:16 +01:00
parent 55456d0578
commit 15d5ac0e70
4 changed files with 140 additions and 114 deletions

View File

@@ -19,7 +19,7 @@ import com.jcraft.jsch.HostKey;
import java.util.Collections;
import java.util.List;
class NoSshInfo implements SshInfo {
public class NoSshInfo implements SshInfo {
@Override
public List<HostKey> getHostKeys() {
return Collections.emptyList();