diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2019-11-23 17:13:36 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2019-11-23 17:18:16 +0100 |
commit | 771ced3236a9200956ca722650e99e94d7f6450a (patch) | |
tree | ef231ab84fa778ee5c7238bb8ae4f2a2ffe01ddc /aurweb/exceptions.py | |
parent | 86e4cd0731b7164a8947fa3497483378aa1de209 (diff) | |
download | aur-771ced3236a9200956ca722650e99e94d7f6450a.tar.gz aur-771ced3236a9200956ca722650e99e94d7f6450a.tar.xz |
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 <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb/exceptions.py')
-rw-r--r-- | aurweb/exceptions.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |