changeset 5468:a6bc489cc536

compare: ignore whitespace around revision string When manually entering a revision ID, it's possible for spurious whitespace to occur around it; this should not cause a 404.
author Søren Løvborg <sorenl@unity3d.com>
date Mon, 31 Aug 2015 17:42:56 +0200
parents b52ada72fc99
children 047ac9eefb71
files kallithea/controllers/compare.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/compare.py	Fri Sep 04 02:07:00 2015 +0200
+++ b/kallithea/controllers/compare.py	Mon Aug 31 17:42:56 2015 +0200
@@ -165,6 +165,9 @@
     @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
                                    'repository.admin')
     def compare(self, repo_name, org_ref_type, org_ref_name, other_ref_type, other_ref_name):
+        org_ref_name = org_ref_name.strip()
+        other_ref_name = other_ref_name.strip()
+
         org_repo = c.db_repo.repo_name
         other_repo = request.GET.get('other_repo', org_repo)
         # If merge is True: