Fix regressions in Subversion path normalization.

Review Request #11040 — Created June 10, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x

Reviewers

We recently fixed a long-standing bug with Subversion path
normalization, allowing some characters that weren't previously
supported to be properly escaped. However, this turned up some
regressions with Subversion 1.9 and older.

Subversion is very particular about which characters (with ASCII values
0 through 128) that must be escaped and which must not be. This doesn't
directly map to what urllib.quote() would normally escape.
Fortunately, it allows us to supplement the list of "safe" characters.

This change adds that list of safe characters based on the lookup table
in Subversion's code, and introduces new unit tests for comparing a URL
for the full 0-128 characters to the output that would be escaped using
exactly Subversion's table. It also runs a file existence check using
the same string, helping us ensure that we won't crash Subversion in CI
with an assertion check.

Tested this in a CI environment against Subversion 1.9, where the
crash was noticed. Unit tests passed.

Commits

Files