Edgewall Software
Modify

Opened 11 years ago

Closed 11 years ago

#11167 closed defect (fixed)

Trac crashes if viewing in blame mode for non-ascii file name with Subversion 1.7.x

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 0.12.6
Component: version control/browser Version: 0.12-stable
Severity: major Keywords: svn17
Cc: Branch:
Release Notes:

Fix Trac crashes in blame mode for non-ascii file name with Subversion 1.7

API Changes:
Internal Changes:

Description (last modified by Jun Omae)

If using Subversion 1.7.x and viewing a content in blame mode for non-ascii file name, Trac crashes by assertion svn_uri_is_canonical.

Checking for non-ascii characters in the URL is introduced in http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/dirent_uri.c?annotate=1064436&pathrev=1064436#l1880, 1.7.0 or later.

10:03:15 PM Trac[browser] DEBUG: Rendering preview of node Résumé.txt@None with mime-type text/plain; charset=iso-8859-15
10:03:15 PM Trac[api] DEBUG: Trying to render HTML preview using PygmentsRenderer [blame, lineno]
10:03:15 PM Trac[svn_fs] INFO: opening ra_local session to 'file:///home/jun66j5/var/svn/svnrepos.dump/t\xc3\xaate/R\xc3\xa9sum\xc3\xa9.txt'
python: subversion/libsvn_subr/dirent_uri.c:1519: uri_skip_ancestor: Assertion `svn_uri_is_canonical(child_uri, ((void *)0))' failed.
Aborted

According to http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/path.c?view=annotate#l821, must escape characters other than the following.

alphanum | mark | ":" | "@" | "&" | "=" | "+" | "$" | ",".

Attachments (0)

Change History (7)

comment:1 by Jun Omae, 11 years ago

Description: modified (diff)

comment:2 by Jun Omae, 11 years ago

We can use svn_uri_canonicalize to canonicalize the subversion uri. In [301fbb7a/jomae.git], fix to canonicalize the uri with it. Also, the changes fix #10514.

comment:3 by Christian Boos, 11 years ago

Ha! Our first get_annotations test ;-)

Nice, I'll test this and let you know.

comment:4 by Jun Omae, 11 years ago

In [301fbb7a/jomae.git] and [329b232f/jomae.git] (unit tests for #10514), all unit and functional tests pass on:

  • Python 2.4.3 (Linux i686) with Subversion 1.7.6
  • Python 2.6.6 (Linux x86_64) with Subversion 1.6.11
  • Python 2.6.6 (Windows XP x86) with Subversion 1.7.9
  • Python 2.6.6 (Windows XP x86) with Subversino 1.6.15

comment:5 by Christian Boos, 11 years ago

OK also for:

  • Python 2.5.4 (Windows 7 x86) with Subversion 1.7.9
  • Python 2.6.5 (Windows 7 x86) with Subversion 1.6.21
  • Python 2.7.2 (Windows 7 x86) with Subversion 1.7.9

comment:6 by Jun Omae, 11 years ago

Owner: set to Jun Omae
Status: newassigned

[301fbb7a/jomae.git] and [329b232f/jomae.git] is applied in [11788]. Thanks for testing.

comment:7 by Jun Omae, 11 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.