Edgewall Software
Modify

Opened 6 years ago

Closed 6 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:

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 Changed 6 years ago by Jun Omae

Description: modified (diff)

comment:2 Changed 6 years ago by Jun Omae

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 Changed 6 years ago by Christian Boos

Ha! Our first get_annotations test ;-)

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

comment:4 Changed 6 years ago by Jun Omae

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 Changed 6 years ago by Christian Boos

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 Changed 6 years ago by Jun Omae

Owner: set to Jun Omae
Status: newassigned

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

comment:7 Changed 6 years ago by Jun Omae

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.
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.