From 771ced3236a9200956ca722650e99e94d7f6450a Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 23 Nov 2019 11:13:36 -0500 Subject: git-serve: check update hook permissions Verify that the update hook exists and is executable before running Git to prevent from broken repositories when permissions are broken. Signed-off-by: Lukas Fleischer --- aurweb/exceptions.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'aurweb/exceptions.py') diff --git a/aurweb/exceptions.py b/aurweb/exceptions.py index 664db68c..62015284 100644 --- a/aurweb/exceptions.py +++ b/aurweb/exceptions.py @@ -16,6 +16,12 @@ class PermissionDeniedException(AurwebException): super(PermissionDeniedException, self).__init__(msg) +class BrokenUpdateHookException(AurwebException): + def __init__(self, cmd): + msg = 'broken update hook: {:s}'.format(cmd) + super(BrokenUpdateHookException, self).__init__(msg) + + class InvalidUserException(AurwebException): def __init__(self, user): msg = 'unknown user: {:s}'.format(user) -- cgit v1.2.3-24-g4f1b