From 2caae38a0f683b04dd31eb1bcf43770b51e1f870 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 27 Jan 2015 17:55:44 +0000 Subject: [PATCH] Add an assertion that manhole code is passed an absolute path for authorized_keys. refs #2235 Signed-off-by: Daira Hopwood --- src/allmydata/manhole.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/allmydata/manhole.py b/src/allmydata/manhole.py index b3321e8e..63b62a54 100644 --- a/src/allmydata/manhole.py +++ b/src/allmydata/manhole.py @@ -12,6 +12,8 @@ from twisted.internet import protocol from zope.interface import implements +from allmydata.util.fileutil import precondition_abspath + # makeTelnetProtocol and _TelnetRealm are for the TelnetManhole class makeTelnetProtocol: @@ -63,6 +65,7 @@ class AuthorizedKeysChecker(conchc.SSHPublicKeyDatabase): """ def __init__(self, authorized_keys_file): + precondition_abspath(authorized_keys_file) self.authorized_keys_file = authorized_keys_file def checkKey(self, credentials): -- 2.45.2