• 2 Posts
  • 691 Comments
Joined 3 years ago
cake
Cake day: June 12th, 2023

help-circle


  • Non-containerized applications. Not in a container. It’s not complicated. Running “on bare metal” sounds cool but it’s a wildly inaccurate description. Containerized applications run on the system natively just like non-containerized applications. So if one of them runs “on bare metal” then then others do as well.

    But historically “on bare metal” is used for embedded or micro-controllers where you don’t have an OS.




  • You know what? Rather than over-complicate things you can probably just check that filenames only contain a small set of white-listed chars. [a-zA-z-._] (and != ‘…’ or ‘.’) or something.

    And one other nit-pick if you’re up for more code-review - your authentication logic should probably be inverted:

    if !ok || user != session.config.username ||
    				pass != session.config.password
    

    I’d change that to be something like

    if ok && user == session.config.username && pass == session.config.password {
       // do login
    } else {
       // not auth
    }
    

    There’s a whole category of security errors where an exception in logic like that causes the code to skip the “you’re not allowed” logic and go right to the “you’re allowed!” block. It’s more of an issue with languages that support exceptions but it’s still considered a best practice generally (it’s also typically easier to read).















  • But even without , the arch way isn’t insane either: when something kernel-related breaks, boot with a live system on USB and fix it.

    That is not a replacement for “arrow-key down during boot to select an older kernel”.

    I have a server with a RAID card and the kernel at some point introduced a bug with the driver that prevented that server from booting. So I select the older kernel at boot, get the system up and running, mark that kernel as the default until the bug is fixed.

    It’s not crazy, it doesn’t take long, you just need to know how the system works.

    I know how the system works very well thankyouverymuch. But that’s an insane option when having multiple older kernels is so easy to do and common.