Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Language runtimes shouldn't support #Windows.

Language runtimes shouldn't support #Windows.

Scheduled Pinned Locked Moved Uncategorized
windowspythonrust
8 Posts 2 Posters 0 Views
  • 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.
  • dickon@splodge.fluff.orgD This user is from outside of this forum
    dickon@splodge.fluff.orgD This user is from outside of this forum
    dickon@splodge.fluff.org
    wrote last edited by
    #1

    Language runtimes shouldn't support #Windows. It buggers up pathnames, and wrapping them in some arbitrary object to get around Windows' brokenness just makes it more difficult than it needs to be on any sane OS.

    Yes, I'm looking at you #Python and #Rust.

    hillu@infosec.exchangeH 1 Reply Last reply
    0
    • dickon@splodge.fluff.orgD dickon@splodge.fluff.org

      Language runtimes shouldn't support #Windows. It buggers up pathnames, and wrapping them in some arbitrary object to get around Windows' brokenness just makes it more difficult than it needs to be on any sane OS.

      Yes, I'm looking at you #Python and #Rust.

      hillu@infosec.exchangeH This user is from outside of this forum
      hillu@infosec.exchangeH This user is from outside of this forum
      hillu@infosec.exchange
      wrote last edited by
      #2

      @dickon They shouldn't pretend that pathnames are strings, either., so what's the alternative?

      dickon@splodge.fluff.orgD 1 Reply Last reply
      0
      • hillu@infosec.exchangeH hillu@infosec.exchange

        @dickon They shouldn't pretend that pathnames are strings, either., so what's the alternative?

        dickon@splodge.fluff.orgD This user is from outside of this forum
        dickon@splodge.fluff.orgD This user is from outside of this forum
        dickon@splodge.fluff.org
        wrote last edited by
        #3

        @hillu Why not? '/' and '\0' are the only forbidden bytes in an element name; looks pretty stringy to me.

        Not Unicode, no.

        hillu@infosec.exchangeH 1 Reply Last reply
        0
        • dickon@splodge.fluff.orgD dickon@splodge.fluff.org

          @hillu Why not? '/' and '\0' are the only forbidden bytes in an element name; looks pretty stringy to me.

          Not Unicode, no.

          hillu@infosec.exchangeH This user is from outside of this forum
          hillu@infosec.exchangeH This user is from outside of this forum
          hillu@infosec.exchange
          wrote last edited by
          #4

          @dickon You seem to favor treating pathnames as bytebuffers, then.
          Forward slashes are not forbidden as part of pathnames, of course. And whether valid UTF-8 sequences are required (or that is ignored altogether) is very much related to what the filesystem implements.

          dickon@splodge.fluff.orgD 1 Reply Last reply
          0
          • hillu@infosec.exchangeH hillu@infosec.exchange

            @dickon You seem to favor treating pathnames as bytebuffers, then.
            Forward slashes are not forbidden as part of pathnames, of course. And whether valid UTF-8 sequences are required (or that is ignored altogether) is very much related to what the filesystem implements.

            dickon@splodge.fluff.orgD This user is from outside of this forum
            dickon@splodge.fluff.orgD This user is from outside of this forum
            dickon@splodge.fluff.org
            wrote last edited by
            #5

            @hillu re '/': yes, hence the 'element name'. But I've never met a Unix filesystem which requires valid UTF-8 sequences, and this causes problems when your APIs can't process them cleanly; whether I like this or not doesn't really matter. Personally I hate spaces in object names as that causes problems all over the shop. But I have to deal with that.

            Windows had a whole class of vulnerabilities around creating a C:\Program.exe at one point. I don't know if that was ever completely sorted.

            hillu@infosec.exchangeH 1 Reply Last reply
            0
            • dickon@splodge.fluff.orgD dickon@splodge.fluff.org

              @hillu re '/': yes, hence the 'element name'. But I've never met a Unix filesystem which requires valid UTF-8 sequences, and this causes problems when your APIs can't process them cleanly; whether I like this or not doesn't really matter. Personally I hate spaces in object names as that causes problems all over the shop. But I have to deal with that.

              Windows had a whole class of vulnerabilities around creating a C:\Program.exe at one point. I don't know if that was ever completely sorted.

              hillu@infosec.exchangeH This user is from outside of this forum
              hillu@infosec.exchangeH This user is from outside of this forum
              hillu@infosec.exchange
              wrote last edited by
              #6

              @dickon I wholeheartedly agree with you that the Windows side is very messy.
              An example for a UNIX filesystem that has thoughts about Unicode is APFS.

              dickon@splodge.fluff.orgD 1 Reply Last reply
              0
              • hillu@infosec.exchangeH hillu@infosec.exchange

                @dickon I wholeheartedly agree with you that the Windows side is very messy.
                An example for a UNIX filesystem that has thoughts about Unicode is APFS.

                dickon@splodge.fluff.orgD This user is from outside of this forum
                dickon@splodge.fluff.orgD This user is from outside of this forum
                dickon@splodge.fluff.org
                wrote last edited by
                #7

                @hillu Interesting; I should have expected Apple to do something like that. https://eclecticlight.co/2021/05/08/explainer-unicode-normalization-and-apfs/ suggests it's actually HFS+ that did, and APFS doesn't, relying instead on some other layer. I'd be fascinated to see what happens if you try that sort of trick in Terminal.app, over NFS, and using the usual POSIX APIs in a small C program. I don't have a Mac to hand, unfortunately.

                hillu@infosec.exchangeH 1 Reply Last reply
                0
                • dickon@splodge.fluff.orgD dickon@splodge.fluff.org

                  @hillu Interesting; I should have expected Apple to do something like that. https://eclecticlight.co/2021/05/08/explainer-unicode-normalization-and-apfs/ suggests it's actually HFS+ that did, and APFS doesn't, relying instead on some other layer. I'd be fascinated to see what happens if you try that sort of trick in Terminal.app, over NFS, and using the usual POSIX APIs in a small C program. I don't have a Mac to hand, unfortunately.

                  hillu@infosec.exchangeH This user is from outside of this forum
                  hillu@infosec.exchangeH This user is from outside of this forum
                  hillu@infosec.exchange
                  wrote last edited by
                  #8

                  @dickon If you try to produce ifiles with invalid UTF-8 sequences, you'll get an EINVAL error if memory serves correctly.

                  1 Reply Last reply
                  1
                  0
                  • R relay@relay.infosec.exchange shared this topic
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups