~edwargix/git.sr.ht

d2cd785d657e12c44b855316650672d876758c41 — Drew DeVault 6 years ago ae1f984
Handle errors from pygit2 with user-supplied data

This isn't a security issue or anything, it just saves me the error
emails.
1 files changed, 4 insertions(+), 1 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +4 -1
@@ 295,7 295,10 @@ def log(owner, repo, ref, path):

        from_id = request.args.get("from")
        if from_id:
            commit = git_repo.get(from_id)
            try:
                commit = git_repo.get(from_id)
            except ValueError:
                abort(404)

        commits = get_log(git_repo, commit)