Create backport branch for 1.7.x issue #4340 fix.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.7.x-issue4340@1461589 13f79535-47bb-0310-9956-ffa450edef68
Backport fix for issue #4340, "fs layer should reject filenames with
trailing \n", to the 1.7.x-issue4340 branch.

Merge r1461562 and r1461580 from trunk, resolving a text conflict
with the former revision, and a tree conflict with the latter revision.

* subversion/libsvn_fs/editor.c: This file doesn't exist in 1.7.x,
   so this change on trunk doesn't apply.

* subversion/libsvn_fs/fs-loader.c: Fix a text conflict caused by the
   existence of additional new tests in trunk. Tweak the test to not
   rely on SVN_TEST_ASSERT_ERROR which doesn't exist in 1.7.x.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.7.x-issue4340@1461592 13f79535-47bb-0310-9956-ffa450edef68
On the 1.7.x-issue4340 branch, fix a cosmetic conflict resolution error.

* subversion/tests/libsvn_fs/fs-test.c
  (filename_trailing_newline): Remove misplaced comment within this function.
   The comment is supposed to separate tests in this file from the test list.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.7.x-issue4340@1461603 13f79535-47bb-0310-9956-ffa450edef68
On the 1.7.x-issue4340 branch, merge r1461701 from trunk, resolving conflicts.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.7.x-issue4340@1465995 13f79535-47bb-0310-9956-ffa450edef68
On the 1.7.x-issue4340 branch, merge r1461760 from trunk, resolving
some semantic conflicts.

* subversion/tests/libsvn_repos/repos-test.c
  (filename_with_control_chars): Account for the lack of the
   SVN_TEST_ASSERT_ERROR macro on the 1.7.x branch.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.7.x-issue4340@1465998 13f79535-47bb-0310-9956-ffa450edef68
On the 1.7.x-issue4340 branch, undo r1465998, which merged changes which now
live on the 1.7.x-issue4340-repos branch.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.7.x-issue4340@1480950 13f79535-47bb-0310-9956-ffa450edef68
On the 1.7.x-issue4340 branch, filter control characters from an error message.

This corresponds to r1481627 on trunk, but the svn_path_illegal_path_escape()
API function used in that commit is not available in 1.7.x. So I've manually
marked the revision as merged using a --record-only merge.

* subversion/libsvn_fs_fs/tree.c
  (): Include svn_ctype.h for svn_ctype_iscntrl().
  (escape_newline): Rename to...
  (illegal_path_escape): ... this, and tweak the code to match the current
   implementation of svn_path_illegal_path_escape() on trunk.
  (check_newline): Update caller.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.7.x-issue4340@1481817 13f79535-47bb-0310-9956-ffa450edef68
Merge the 1.7.x-issue 4340 branch into 1.7.x.

 * r1461562, r1461580, r1461701, r1481627
   Fix issue #4340, "filenames containing \n corrupt FSFS repositories"
   Justification:
     Newline characters can severely corrupt FSFS revision files and
     should never enter the repository for this reason. See discussion
     linked from issue #4340 for more information.
   Notes:
     r1461701 revises the changes made in the earlier revisions,
     and is the result of a long dev@ discussion that eventually concluded
     in this subthread: http://svn.haxx.se/dev/archive-2013-04/0056.shtml
     This issue can be exploited by people with commit access to corrupt
     an FSFS repository, and has been assigned a CVE number: CVE-2013-1968
     r1481627 addresses concerns raised by danielsh.
   Branch:
     ^/subversion/branches/1.7.x-issue4340
   Votes:
     +1: stsp, danielsh, rhuijben
     +1: cmpilato (without r1481627)


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.7.x@1485182 13f79535-47bb-0310-9956-ffa450edef68