gitweb: Fix bug in evaluate_path_info
[gitweb.git] / gitweb / gitweb.perl
index e5910ce8f93cbfb92fdb2ed63c65140d9b8b39b3..c4d3e0846a546435dad8386674ac0049574789e0 100755 (executable)
@@ -780,10 +780,10 @@ sub evaluate_path_info {
                'history',
        );
 
-       # we want to catch
+       # we want to catch, among others
        # [$hash_parent_base[:$file_parent]..]$hash_parent[:$file_name]
        my ($parentrefname, $parentpathname, $refname, $pathname) =
-               ($path_info =~ /^(?:(.+?)(?::(.+))?\.\.)?(.+?)(?::(.+))?$/);
+               ($path_info =~ /^(?:(.+?)(?::(.+))?\.\.)?([^:]+?)?(?::(.+))?$/);
 
        # first, analyze the 'current' part
        if (defined $pathname) {