Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Bug: handling special characters in filenames

    Surfer
    2
    7
    271
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • robi
      robi last edited by robi

      Just found another bug in Surfer: When you play a video you have a button "copy link". This button copies the original file name into the URL but doesn't translate special characters (e.g. space -> %20) so that the link will not work. Had to manually edit it for linking a file.

      There also doesn't appear to be a way to close the preview pane.

      Life of Advanced Technology

      1 Reply Last reply Reply Quote 2
      • nebulon
        nebulon Staff last edited by

        Well spotted, although I don't think the space would have made your browser not being able to open that URL. Either way I've fixed this now, pending a package release.

        robi 1 Reply Last reply Reply Quote 2
        • robi
          robi @nebulon last edited by

          @nebulon that is exactly what happened and how the bug was found.. it didn't open and needed editing.

          was there a preview pane close 'X' added?

          Life of Advanced Technology

          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            Yes also the filename is put back now.

            1 Reply Last reply Reply Quote 1
            • robi
              robi last edited by

              Another issue is with #, Surfer doesn't seem to like it in filenames and can't serve those files with the webserver.

              Life of Advanced Technology

              nebulon 1 Reply Last reply Reply Quote 0
              • nebulon
                nebulon Staff @robi last edited by

                @robi this should be fixed with https://git.cloudron.io/cloudron/surfer/-/commit/353ac1f5cb0c1da988e68ca35a417b35130b0d25 however before I release a new package I need to add more filepath encoding tests.

                nebulon 1 Reply Last reply Reply Quote 0
                • nebulon
                  nebulon Staff @nebulon last edited by nebulon

                  Ok I added those test cases and made a new package release now. Please be aware that if you just use # in a path in the browser URL bar, without encoding it, the browser will treat this as a URL hash, not as part of the filepath.

                  eg. foo/bar#baz.txt will end up as foo/bar only.

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post
                  Powered by NodeBB