Commons Exec
  1. Commons Exec
  2. EXEC-26

Extend test suite to check non-trivial characters

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Labels:
      None

      Description

      Might be interesting to check whether spaces and other dangerous characters are properly handled in paths/args.

      1. EXEC-26.patch
        5 kB
        Benjamin Bentmann

        Activity

        Hide
        Benjamin Bentmann added a comment -

        The file "test $;`(0)[1]

        {2}

        .dcl" is missing from the patch and needs to be added by someone familar with this shell.

        Show
        Benjamin Bentmann added a comment - The file "test $;`(0) [1] {2} .dcl" is missing from the patch and needs to be added by someone familar with this shell.
        Hide
        Sebb added a comment -

        The DCL extension implies OpenVMS.

        That filename is not valid on the ODS-2 VMS file system. Not sure if it is even valid on ODS-5, so the test will need to be skipped for VMS.

        Show
        Sebb added a comment - The DCL extension implies OpenVMS. That filename is not valid on the ODS-2 VMS file system. Not sure if it is even valid on ODS-5, so the test will need to be skipped for VMS.
        Hide
        Siegfried Goeschl added a comment - - edited

        I applied the patch and it works on my box (Mac OS X) but I'm not sure if we can create the directory and files on all OS we support, e.g OpenVMS, z/OS, OS/2. And not not being able to create those directory and files would effectively break the regression test suite for those platforms. So I will not apply the patch but I added testExecuteWithFancyArg to the DefaultExecutorTest.

        So if nobody objects with any better reasoning I will reject the patch ...

        Show
        Siegfried Goeschl added a comment - - edited I applied the patch and it works on my box (Mac OS X) but I'm not sure if we can create the directory and files on all OS we support, e.g OpenVMS, z/OS, OS/2. And not not being able to create those directory and files would effectively break the regression test suite for those platforms. So I will not apply the patch but I added testExecuteWithFancyArg to the DefaultExecutorTest. So if nobody objects with any better reasoning I will reject the patch ...
        Hide
        Sebb added a comment -

        Why not check the OS before running the test?

        Or if tests for odd characters are required, then define different filenames for different OSes.

        As it is, the name that is chosen does not include \ : * ? " < > | which are all valid on Unix but not Windows, so it is not a full test.

        Show
        Sebb added a comment - Why not check the OS before running the test? Or if tests for odd characters are required, then define different filenames for different OSes. As it is, the name that is chosen does not include \ : * ? " < > | which are all valid on Unix but not Windows, so it is not a full test.
        Hide
        Siegfried Goeschl added a comment -

        At the end of the day there is no way to do this. If I add files valid or one OS but not valid for a different OS it will break SVN checkout and/or unpacking the regression test driver.

        Show
        Siegfried Goeschl added a comment - At the end of the day there is no way to do this. If I add files valid or one OS but not valid for a different OS it will break SVN checkout and/or unpacking the regression test driver.

          People

          • Assignee:
            Siegfried Goeschl
            Reporter:
            Benjamin Bentmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development