• 1 Post
  • 181 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).








  • The drive got whipped [sic]

    Oh, it was just sitting there and “got wiped”? Not because of a command you ran?

    Sorry to be snarky but when asking for help you need to provide what you did, what error message you see now or what you expect to happen and what is actually happening. Also what OS you’re using would be helpful.

    Presumably you should be able to get the drive back into a usable state - but I’m not familiar with SAS drives.