Patchwork [8,of,9,remotefilelog-ext,getfile-http] remotefilelogserver: disable remotefilelog serving over non-ssh protocols

login
register
mail settings
Submitter Augie Fackler
Date July 1, 2015, 8:05 p.m.
Message ID <99e8e62032be03b27e45.1435781145@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/9859/
State Not Applicable
Headers show

Comments

Augie Fackler - July 1, 2015, 8:05 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1435610071 14400
#      Mon Jun 29 16:34:31 2015 -0400
# Node ID 99e8e62032be03b27e450cfb261a5cd61a960360
# Parent  d95d09694be01c8423372350ac9bffa876383e0e
remotefilelogserver: disable remotefilelog serving over non-ssh protocols

Patch

diff --git a/remotefilelog/remotefilelogserver.py b/remotefilelog/remotefilelogserver.py
--- a/remotefilelog/remotefilelogserver.py
+++ b/remotefilelog/remotefilelogserver.py
@@ -175,6 +175,8 @@  def getfiles(repo, proto):
     """
     if shallowrepo.requirement in repo.requirements:
         raise util.Abort(_('cannot fetch remote files from shallow repo'))
+    if not isinstance(proto, sshserver.sshserver):
+        raise util.Abort(_('cannot fetch remote files over non-ssh protocol'))
 
     def streamer():
         fin = proto.fin